Use is_maximized and fix incorrect ifdef
Some checks failed
Build / build-gentoo (push) Successful in 1m49s
Build / download-system-deps (push) Successful in 4m42s
Build / get-source-code (push) Successful in 13m57s
Build / build-deb (push) Failing after 5m37s
Build / build-appimage (push) Successful in 4m32s
Build / build-android (push) Failing after 3m0s
Build / build-windows (push) Failing after 7m30s
Some checks failed
Build / build-gentoo (push) Successful in 1m49s
Build / download-system-deps (push) Successful in 4m42s
Build / get-source-code (push) Successful in 13m57s
Build / build-deb (push) Failing after 5m37s
Build / build-appimage (push) Successful in 4m32s
Build / build-android (push) Failing after 3m0s
Build / build-windows (push) Failing after 7m30s
This commit is contained in:
parent
a2a93558a8
commit
16995b71b3
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue