From 2f1b98c570568b4faf2839dcc930b1870b2049cb Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Fri, 7 Feb 2025 20:31:41 +0000 Subject: [PATCH] game_window: revert window resize fix This partially reverts commit 70ebdaa685b21272d33a96562f8601ed9487b476. --- UnleashedRecomp/app.cpp | 1 - UnleashedRecomp/ui/game_window.cpp | 7 +------ UnleashedRecomp/ui/game_window.h | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/UnleashedRecomp/app.cpp b/UnleashedRecomp/app.cpp index 25d4521..5b6c163 100644 --- a/UnleashedRecomp/app.cpp +++ b/UnleashedRecomp/app.cpp @@ -38,7 +38,6 @@ PPC_FUNC(sub_824EB490) SWA::SGlobals::Init(); Registry::Save(); - GameWindow::SetResizable(true); __imp__sub_824EB490(ctx, base); } diff --git a/UnleashedRecomp/ui/game_window.cpp b/UnleashedRecomp/ui/game_window.cpp index 126a36b..a6704e6 100644 --- a/UnleashedRecomp/ui/game_window.cpp +++ b/UnleashedRecomp/ui/game_window.cpp @@ -382,11 +382,6 @@ void GameWindow::SetFullscreenCursorVisibility(bool isVisible) } } -void GameWindow::SetResizable(bool isResizable) -{ - SDL_SetWindowResizable(s_pWindow, (SDL_bool)isResizable); -} - bool GameWindow::IsMaximised() { return SDL_GetWindowFlags(s_pWindow) & SDL_WINDOW_MAXIMIZED; @@ -447,7 +442,7 @@ void GameWindow::ResetDimensions() uint32_t GameWindow::GetWindowFlags() { - uint32_t flags = SDL_WINDOW_HIDDEN | SDL_WINDOW_ALLOW_HIGHDPI; + uint32_t flags = SDL_WINDOW_HIDDEN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI; if (Config::WindowState == EWindowState::Maximised) flags |= SDL_WINDOW_MAXIMIZED; diff --git a/UnleashedRecomp/ui/game_window.h b/UnleashedRecomp/ui/game_window.h index 19bfc90..5f51b2f 100644 --- a/UnleashedRecomp/ui/game_window.h +++ b/UnleashedRecomp/ui/game_window.h @@ -34,7 +34,6 @@ public: static bool IsFullscreen(); static bool SetFullscreen(bool isEnabled); static void SetFullscreenCursorVisibility(bool isVisible); - static void SetResizable(bool isResizable); static bool IsMaximised(); static EWindowState SetMaximised(bool isEnabled); static SDL_Rect GetDimensions();