From 009cc66a24529eda12ac399c072ea32f20855a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ko=C5=82odziejski?= Date: Tue, 15 Mar 2005 09:43:38 +0000 Subject: [PATCH] fixed compilation for for overlay SDL latest changes, and formating code. Wince SDL port is currently broken, it crash at NULL _screen pointer while locking SDL surface inside OSystem_SDL::clearScreen() func svn-id: r17152 --- backends/wince/wince-sdl.cpp | 32 ++++++++++++++++---------------- backends/wince/wince-sdl.h | 13 +++++++------ 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/backends/wince/wince-sdl.cpp b/backends/wince/wince-sdl.cpp index 1affda9df6f..6a3aeaeaaaf 100644 --- a/backends/wince/wince-sdl.cpp +++ b/backends/wince/wince-sdl.cpp @@ -733,24 +733,24 @@ void OSystem_WINCE3::update_game_settings() { get_sample_rate(); } -void OSystem_WINCE3::initSize(uint w, uint h, int overlaySize) { +void OSystem_WINCE3::initSize(uint w, uint h, int overlayScale) { - if (_isSmartphone && h == 240) - h = 200; // mainly for the launcher + if (_isSmartphone && h == 240) + h = 200; // mainly for the launcher - switch (_transactionMode) { - case kTransactionActive: - _transactionDetails.w = w; - _transactionDetails.wChanged = true; - _transactionDetails.h = h; - _transactionDetails.hChanged = true; - return; - break; - case kTransactionCommit: - break; - default: - break; - } + switch (_transactionMode) { + case kTransactionActive: + _transactionDetails.w = w; + _transactionDetails.h = h; + _transactionDetails.overlayScale = overlayScale; + _transactionDetails.sizeChanged = true; + return; + break; + case kTransactionCommit: + break; + default: + break; + } if (w == 320 && h == 200 && !_isSmartphone) h = 240; // use the extra 40 pixels height for the toolbar diff --git a/backends/wince/wince-sdl.h b/backends/wince/wince-sdl.h index 6338b839a87..7d92d55b92b 100644 --- a/backends/wince/wince-sdl.h +++ b/backends/wince/wince-sdl.h @@ -36,6 +36,8 @@ #include + + #define TOTAL_ZONES 3 class OSystem_WINCE3 : public OSystem_SDL { @@ -74,6 +76,7 @@ public: //#ifdef WIN32_PLATFORM_WFSP // Smartphone actions + void initZones(); void loadSmartphoneConfigurationElement(String element, int &value, int defaultValue); void loadSmartphoneConfiguration(); @@ -190,15 +193,13 @@ private: int _currentZone; typedef struct zoneDesc { - int x; - int y; - int width; - int height; + int x; + int y; + int width; + int height; } zoneDesc; static zoneDesc _zones[TOTAL_ZONES]; - - }; #endif