From ce749777eaf88e1afc54349390fde0c62929e845 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 21 Jul 2008 23:58:29 +0200 Subject: [PATCH] Store orientation list. Available fullscreen resolution list is created basing on current screen resolution and its rotated equivalent. Save current orientation in table, so that proper orientation can be matched to each resolution. --- src/video/symbian/SDL_epocvideo.cpp | 15 +++++++++++++++ src/video/symbian/SDL_epocvideo.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/src/video/symbian/SDL_epocvideo.cpp b/src/video/symbian/SDL_epocvideo.cpp index b4675a6..e0dcce9 100644 --- a/src/video/symbian/SDL_epocvideo.cpp +++ b/src/video/symbian/SDL_epocvideo.cpp @@ -216,6 +216,19 @@ int S60_VideoInit(_THIS, SDL_PixelFormat *vformat) Private->iRect[1]->w = sz.iHeight; Private->iRect[1]->h = sz.iWidth; + Private->iOrientation = new CAknAppUi::TAppUiOrientation[2]; + + if( reinterpret_cast(CEikonEnv::Static()->EikAppUi())->Orientation() == CAknAppUi::EAppUiOrientationPortrait ) + { + Private->iOrientation[0] = CAknAppUi::EAppUiOrientationPortrait; + Private->iOrientation[1] = CAknAppUi::EAppUiOrientationLandscape; + } + else + { + Private->iOrientation[0] = CAknAppUi::EAppUiOrientationLandscape; + Private->iOrientation[1] = CAknAppUi::EAppUiOrientationPortrait; + } + return(0); } @@ -701,6 +714,8 @@ static void S60_DirectUpdate(_THIS, int numrects, SDL_Rect *rects) */ void S60_VideoQuit(_THIS) { + delete[] Private->iOrientation; + delete Private->iRect[0]; delete Private->iRect[1]; delete[] Private->iRect; diff --git a/src/video/symbian/SDL_epocvideo.h b/src/video/symbian/SDL_epocvideo.h index fdea589..c2f6752 100644 --- a/src/video/symbian/SDL_epocvideo.h +++ b/src/video/symbian/SDL_epocvideo.h @@ -25,6 +25,7 @@ #include #include +#include /* Hidden "this" pointer for the video functions */ #define _THIS SDL_VideoDevice *_this @@ -41,6 +42,7 @@ struct SDL_PrivateVideoData TSize iSwSurfaceSize; TUint8* iSwSurface; SDL_Rect** iRect; + CAknAppUi::TAppUiOrientation* iOrientation; }; struct SDL_PrivateGLData -- 2.11.4.GIT