From 5c94c594fc5c7cd48261facf05c681095f7c3c5e Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 10 Aug 2008 20:56:10 +0200 Subject: [PATCH] Disallow resize if video surface is not resizable. Disallow resize caused by orientation changes if video surface is not resizable. Note that this is sub optimal solution, as currently there's no way to turn automatic orientation changes on again. --- src/video/symbian/SDL_epocvideo.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/video/symbian/SDL_epocvideo.cpp b/src/video/symbian/SDL_epocvideo.cpp index 762aee3..b996100 100644 --- a/src/video/symbian/SDL_epocvideo.cpp +++ b/src/video/symbian/SDL_epocvideo.cpp @@ -622,13 +622,18 @@ SDL_Surface *S60_SetVideoMode(_THIS, SDL_Surface *current, int width, int height const TSize sz = GetScreenSize(); - if((sz.iWidth < sz.iHeight && orientation != CAknAppUi::EAppUiOrientationPortrait) || - (sz.iWidth > sz.iHeight && orientation != CAknAppUi::EAppUiOrientationLandscape)) + if(sz.iWidth < sz.iHeight && orientation != CAknAppUi::EAppUiOrientationPortrait || + sz.iWidth > sz.iHeight && orientation != CAknAppUi::EAppUiOrientationLandscape) { EpocSdlEnv::SetOrientation(orientation, TSize(width, height), GetDisplayMode(current->format->BitsPerPixel)); } else { + if((flags & SDL_RESIZABLE) == 0) + { + EpocSdlEnv::SetOrientation(orientation, TSize(width, height), GetDisplayMode(current->format->BitsPerPixel)); + } + const int err = EpocSdlEnv::AllocSurface(TSize(width, height), GetDisplayMode(current->format->BitsPerPixel)); if(err != KErrNone) return NULL; -- 2.11.4.GIT