diff --git a/backends/ui/imgui/RendererBackend.cpp b/backends/ui/imgui/RendererBackend.cpp index a636845..df03633 100644 --- a/backends/ui/imgui/RendererBackend.cpp +++ b/backends/ui/imgui/RendererBackend.cpp @@ -471,7 +471,7 @@ SDL_HitTestResult RendererBackend::HitTest(SDL_Window *window, const SDL_Point * } void RendererBackend::EndMainMenuBar() { -#ifndef __EMSCRIPTEN +#ifndef __EMSCRIPTEN__ menubar_end = ImGui::GetCursorPosX(); ImVec2 size = ImGui::GetWindowSize(); float btnw = size.y; @@ -483,7 +483,7 @@ void RendererBackend::EndMainMenuBar() { SDL_MinimizeWindow(window); } ImGui::SetCursorPosX(size.x - (btnw * 2)); - if (SDL_GetWindowFlags(window) & SDL_WINDOW_MAXIMIZED) { + if (is_maximized()) { if (ImGui::Button(ICON_FK_WINDOW_RESTORE, btn_size)) SDL_RestoreWindow(window); } else { if (ImGui::Button(ICON_FK_WINDOW_MAXIMIZE, btn_size)) SDL_MaximizeWindow(window);