From f19e10e6b21893d1a021ba40f3d1b1fb2762fd01 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 10 Aug 2008 21:38:47 +0200 Subject: [PATCH] Reenable automatic screen resizes on SDL_RESIZABLE Reenable automatic screen resize events when creating SDL_RESIZABLE video surface. Calling EpocSdlEnv::SetOrientation() was wrong, as it was expecting upcoming HandleResourceChangeL() call, which isn't there due to no real orientation change occuring and thus it was poisoning future resize events. Just setting orientation is enough here. Note that the behaviour is still faulty during external orientation change inside the SDL_SetVideoMode() call, which can be reproduced by creating fullscreen video surface, rotating the phone (accelerometer required) and then creating resizable video surface. --- src/video/symbian/SDL_epocvideo.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/video/symbian/SDL_epocvideo.cpp b/src/video/symbian/SDL_epocvideo.cpp index b996100..dfe209b 100644 --- a/src/video/symbian/SDL_epocvideo.cpp +++ b/src/video/symbian/SDL_epocvideo.cpp @@ -631,7 +631,11 @@ SDL_Surface *S60_SetVideoMode(_THIS, SDL_Surface *current, int width, int height { if((flags & SDL_RESIZABLE) == 0) { - EpocSdlEnv::SetOrientation(orientation, TSize(width, height), GetDisplayMode(current->format->BitsPerPixel)); + TRAPD(err, static_cast(CEikonEnv::Static()->EikAppUi())->SetOrientationL(orientation)); + } + else + { + TRAPD(err, static_cast(CEikonEnv::Static()->EikAppUi())->SetOrientationL(CAknAppUi::EAppUiOrientationUnspecified)); } const int err = EpocSdlEnv::AllocSurface(TSize(width, height), GetDisplayMode(current->format->BitsPerPixel)); -- 2.11.4.GIT