From 437d7b80e321dc51215e22b93559286f6e51638c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 25 Oct 2015 11:19:41 +0100 Subject: [PATCH] Fix window resize/fullscreen ingame on Mac and other SDL builds --- UI/NativeApp.cpp | 6 ++++++ ext/native/base/PCMain.cpp | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 8a61e8c4f8..39df8f65d5 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -738,6 +738,12 @@ void NativeRender() { if (g_Config.iGPUBackend == GPU_BACKEND_DIRECT3D9) { #ifdef _WIN32 D3D9_Resize(0); +#endif + } else if (g_Config.iGPUBackend == GPU_BACKEND_OPENGL) { +#ifndef _WIN32 + PSP_CoreParameter().pixelWidth = pixel_xres; + PSP_CoreParameter().pixelHeight = pixel_yres; + NativeMessageReceived("gpu resized", ""); #endif } } diff --git a/ext/native/base/PCMain.cpp b/ext/native/base/PCMain.cpp index 8c0e2a2f54..cce9327b67 100644 --- a/ext/native/base/PCMain.cpp +++ b/ext/native/base/PCMain.cpp @@ -689,9 +689,9 @@ int main(int argc, char *argv[]) { // Hide/Show cursor correctly toggling fullscreen if (lastUIState == UISTATE_INGAME && fullscreen && !g_Config.bShowTouchControls) { - SDL_ShowCursor(SDL_DISABLE); + SDL_ShowCursor(SDL_DISABLE); } else if (lastUIState != UISTATE_INGAME || !fullscreen) { - SDL_ShowCursor(SDL_ENABLE); + SDL_ShowCursor(SDL_ENABLE); } #endif break;