impr: Prevent canvas flickering in web build

This commit is contained in:
WerWolv
2024-07-01 20:09:16 +02:00
parent 2cd8b13c1d
commit 60b81e714b
3 changed files with 7 additions and 9 deletions

View File

@@ -87,6 +87,7 @@ namespace hex {
glfwSetWindowRefreshCallback(m_window, [](GLFWwindow *window) {
auto win = static_cast<Window *>(glfwGetWindowUserPointer(window));
resizeCanvas();
win->fullFrame();
});

View File

@@ -844,7 +844,8 @@ namespace hex {
if (macosIsWindowBeingResizedByUser(window)) {
ImGui::GetIO().MousePos = ImVec2();
}
#else
#elif defined(OS_WEB)
win->fullFrame();
#endif
});