From ef106f9b1dc32cc51430f5d705123e7d547d04b2 Mon Sep 17 00:00:00 2001 From: Juha Laukkanen Date: Tue, 15 Jul 2014 19:26:15 +0900 Subject: [PATCH] Hack fix for OSX SDL window resize. Possibly SDL 1.2 & OSX bug. --- UI/NativeApp.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 70b312cf46..7f556750bd 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -863,6 +863,17 @@ void NativeResized() { // The UI now supports any offset but not the EmuScreen yet. uiContext->SetBounds(Bounds(0, 0, dp_xres, dp_yres)); // uiContext->SetBounds(Bounds(dp_xres/2, 0, dp_xres / 2, dp_yres / 2)); + + +// OSX 10.6 and SDL 1.2 bug. +#ifdef __APPLE__ + static int dp_xres_old=dp_xres; + if (dp_xres != dp_xres_old) { + UIShader_Init(); + uiTexture->Load("ui_atlas.zim"); + dp_xres_old = dp_xres; + } +#endif } }