Set render hooks

This commit is contained in:
dcvz 2024-06-11 22:23:42 +02:00
parent 9d64742b68
commit 0aa60be265
4 changed files with 6 additions and 3 deletions

View file

@ -119,7 +119,9 @@ namespace recompui {
void set_cont_active(bool active);
void activate_mouse();
void message_box(const char* msg);
void message_box(const char* msg);
void set_render_hooks();
}
#endif

View file

@ -174,6 +174,7 @@ ultramodern::renderer::SetupResult map_setup_result(RT64::Application::SetupResu
zelda64::renderer::RT64Context::RT64Context(uint8_t* rdram, ultramodern::renderer::WindowHandle window_handle, bool debug) {
static unsigned char dummy_rom_header[0x40];
recompui::set_render_hooks();
// Set up the RT64 application core fields.
RT64::Application::Core appCore{};

View file

@ -973,7 +973,7 @@ public:
void make_bindings(Rml::Context* context) override {
// initially set cont state for ui help
recomp::config_menu_set_cont_or_kb(recompui::get_cont_active());
recomp::config_menu_set_cont_or_kb(recompui::get_cont_active());
make_nav_help_bindings(context);
make_general_bindings(context);
make_controls_bindings(context);

View file

@ -1457,7 +1457,7 @@ void deinit_hook() {
ui_context.reset();
}
void set_rt64_hooks() {
void recompui::set_render_hooks() {
RT64::SetRenderHooks(init_hook, draw_hook, deinit_hook);
}