[Scummvm-cvs-logs] SF.net SVN: scummvm:[35232] scummvm/trunk/backends/platform/wince
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu Dec 4 09:10:32 CET 2008
Revision: 35232
http://scummvm.svn.sourceforge.net/scummvm/?rev=35232&view=rev
Author: thebluegr
Date: 2008-12-04 08:10:32 +0000 (Thu, 04 Dec 2008)
Log Message:
-----------
Some changes which will hopefully fix bug #2387217 - "WINCE: SVN trunk compilation broken".
I've done the changes based on the corresponding SDL backend functions. Please verify that everything is working correctly, as I don't have a WinCE device to test this
Modified Paths:
--------------
scummvm/trunk/backends/platform/wince/wince-sdl.cpp
scummvm/trunk/backends/platform/wince/wince-sdl.h
Modified: scummvm/trunk/backends/platform/wince/wince-sdl.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/wince-sdl.cpp 2008-12-04 00:52:12 UTC (rev 35231)
+++ scummvm/trunk/backends/platform/wince/wince-sdl.cpp 2008-12-04 08:10:32 UTC (rev 35232)
@@ -1342,7 +1342,7 @@
}
-void OSystem_WINCE3::loadGFXMode() {
+bool OSystem_WINCE3::loadGFXMode() {
int displayWidth;
int displayHeight;
unsigned int flags = SDL_FULLSCREEN | SDL_SWSURFACE;
@@ -1385,6 +1385,8 @@
if (_hwscreen == NULL) {
warning("SDL_SetVideoMode says we can't switch to that mode (%s)", SDL_GetError());
quit();
+ } else {
+ return false;
}
// see what orientation sdl finally accepted
@@ -1449,6 +1451,8 @@
_km.y_max = _screenHeight * _scaleFactorXm / _scaleFactorXd - 1;
_km.delay_time = 25;
_km.last_time = 0;
+
+ return true;
}
void OSystem_WINCE3::unloadGFXMode() {
@@ -1468,9 +1472,9 @@
}
}
-void OSystem_WINCE3::hotswapGFXMode() {
+bool OSystem_WINCE3::hotswapGFXMode() {
if (!_screen)
- return;
+ return false;
// Keep around the old _screen & _tmpscreen so we can restore the screen data
// after the mode switch. (also for the overlay)
@@ -1491,8 +1495,15 @@
}
// Setup the new GFX mode
- loadGFXMode();
+ if (!loadGFXMode()) {
+ unloadGFXMode();
+ _screen = old_screen;
+ _overlayscreen = old_overlayscreen;
+
+ return false;
+ }
+
// reset palette
SDL_SetColors(_screen, _currentPalette, 0, 256);
@@ -1516,6 +1527,8 @@
// Make sure that a Common::EVENT_SCREEN_CHANGED gets sent later -> FIXME this crashes when no game has been loaded.
// _modeChanged = true;
+
+ return true;
}
void OSystem_WINCE3::internUpdateScreen() {
Modified: scummvm/trunk/backends/platform/wince/wince-sdl.h
===================================================================
--- scummvm/trunk/backends/platform/wince/wince-sdl.h 2008-12-04 00:52:12 UTC (rev 35231)
+++ scummvm/trunk/backends/platform/wince/wince-sdl.h 2008-12-04 08:10:32 UTC (rev 35232)
@@ -131,9 +131,9 @@
static bool isOzone();
protected:
- void loadGFXMode();
+ bool loadGFXMode();
void unloadGFXMode();
- void hotswapGFXMode();
+ bool hotswapGFXMode();
bool saveScreenshot(const char *filename);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list