diff --git a/libultraship b/libultraship index 3e46fe77a..7fc73766e 160000 --- a/libultraship +++ b/libultraship @@ -1 +1 @@ -Subproject commit 3e46fe77a4581a84f9c0edfab9c3a69a5320fe01 +Subproject commit 7fc73766ed4c636b49e2218d948100ee7782456e diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 636687b33..7856de88f 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1355,14 +1355,20 @@ extern "C" void Graph_StartFrame() { CVarClear(CVAR_NEW_FILE_DROPPED); CVarClear(CVAR_DROPPED_FILE); } - - OTRGlobals::Instance->context->GetWindow()->StartFrame(); } void RunCommands(Gfx* Commands, const std::vector>& mtx_replacements) { + auto wnd = std::dynamic_pointer_cast(OTRGlobals::Instance->context->GetWindow()); + + if (wnd == nullptr) { + return; + } + + // Process window events for resize, mouse, keyboard events + wnd->HandleEvents(); + for (const auto& m : mtx_replacements) { - gfx_run(Commands, m); - gfx_end_frame(); + wnd->DrawAndRunGraphicsCommands(Commands, m); } }