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
This commit is contained in:
Paweł Kołodziejski 2005-03-15 09:43:38 +00:00
parent 1a368f2e7c
commit 009cc66a24
2 changed files with 23 additions and 22 deletions

View File

@ -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

View File

@ -36,6 +36,8 @@
#include <SDL.h>
#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