summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArchez <Archez@users.noreply.github.com>2025-01-11 00:33:19 -0500
committerGitHub <noreply@github.com>2025-01-11 00:33:19 -0500
commit4e8ccce002ce1503887891cabc7577678bc95c5a (patch)
treee61d918615c31cfc54f45b618cd770993b32afde
parent323ea2df962eaa8c6a8c2d2fca0e8ae8b5f8066b (diff)
Move Window calls to portside (#4833)
* Move LUS window calls to portside * move dropped frame handling to port side * Use fast3d all in one draw * bump to upstream lus
m---------libultraship0
-rw-r--r--soh/soh/OTRGlobals.cpp14
2 files changed, 10 insertions, 4 deletions
diff --git a/libultraship b/libultraship
-Subproject 3e46fe77a4581a84f9c0edfab9c3a69a5320fe0
+Subproject 7fc73766ed4c636b49e2218d948100ee7782456
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<std::unordered_map<Mtx*, MtxF>>& mtx_replacements) {
+ auto wnd = std::dynamic_pointer_cast<Fast::Fast3dWindow>(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);
}
}