diff --git a/ext/native/base/PCMain.cpp b/ext/native/base/PCMain.cpp index 3009521f29..86403e634d 100644 --- a/ext/native/base/PCMain.cpp +++ b/ext/native/base/PCMain.cpp @@ -672,35 +672,39 @@ int main(int argc, char *argv[]) { case SDL_QUIT: g_QuitRequested = 1; break; + #if !defined(MOBILE_DEVICE) case SDL_WINDOWEVENT: - switch (event.window.event) { + switch (event.window.event) { case SDL_WINDOWEVENT_RESIZED: - { - Uint32 window_flags = SDL_GetWindowFlags(g_Screen); - bool fullscreen = (window_flags & SDL_WINDOW_FULLSCREEN); + { + Uint32 window_flags = SDL_GetWindowFlags(g_Screen); + bool fullscreen = (window_flags & SDL_WINDOW_FULLSCREEN); - pixel_xres = event.window.data1; - pixel_yres = event.window.data2; - dp_xres = (float)pixel_xres * dpi_scale; - dp_yres = (float)pixel_yres * dpi_scale; - NativeResized(); + pixel_xres = event.window.data1; + pixel_yres = event.window.data2; + dp_xres = (float)pixel_xres * dpi_scale; + dp_yres = (float)pixel_yres * dpi_scale; + NativeResized(); #if defined(PPSSPP) - // Set variable here in case fullscreen was toggled by hotkey - g_Config.bFullScreen = fullscreen; + // Set variable here in case fullscreen was toggled by hotkey + g_Config.bFullScreen = fullscreen; - // Hide/Show cursor correctly toggling fullscreen - if (lastUIState == UISTATE_INGAME && fullscreen && !g_Config.bShowTouchControls) { - SDL_ShowCursor(SDL_DISABLE); - } else if (lastUIState != UISTATE_INGAME || !fullscreen) { - SDL_ShowCursor(SDL_ENABLE); - } -#endif - break; + // Hide/Show cursor correctly toggling fullscreen + if (lastUIState == UISTATE_INGAME && fullscreen && !g_Config.bShowTouchControls) { + SDL_ShowCursor(SDL_DISABLE); + } else if (lastUIState != UISTATE_INGAME || !fullscreen) { + SDL_ShowCursor(SDL_ENABLE); } + #endif break; } + + default: + break; + } + break; #endif case SDL_KEYDOWN: {