aboutsummaryrefslogtreecommitdiff
path: root/backends/sdl/sdl.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2004-11-23 21:30:38 +0000
committerEugene Sandulenko2004-11-23 21:30:38 +0000
commit7877ccf628d4033a4941762b867b819770a61fa6 (patch)
tree96aa6102564f8847f0c51c82bfe73699c3e281f7 /backends/sdl/sdl.cpp
parent37e900a2a3201550b7027c271c28a0c943837271 (diff)
downloadscummvm-rg350-7877ccf628d4033a4941762b867b819770a61fa6.tar.gz
scummvm-rg350-7877ccf628d4033a4941762b867b819770a61fa6.tar.bz2
scummvm-rg350-7877ccf628d4033a4941762b867b819770a61fa6.zip
Next step in transaction implementation. Now it postpones all calls.
NOTE: This breaks most ports, and they will not pass assertions. If you will fix it (by moving violating OSystem calls to go() method), I'll be grateful. If you don't bother to fix it, there is a workaround. Just comment out beginGFXTransaction() and endGFXTransaction() in backends/sdl/graphics.cpp. This will tunr it off and will use default transaction-less implementation. svn-id: r15870
Diffstat (limited to 'backends/sdl/sdl.cpp')
-rw-r--r--backends/sdl/sdl.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp
index 7883d292f5..80d9d62dfa 100644
--- a/backends/sdl/sdl.cpp
+++ b/backends/sdl/sdl.cpp
@@ -104,7 +104,7 @@ OSystem_SDL::OSystem_SDL()
_mouseHotspotX(0), _mouseHotspotY(0),
_currentShakePos(0), _newShakePos(0),
_paletteDirtyStart(0), _paletteDirtyEnd(0),
- _graphicsMutex(0) {
+ _graphicsMutex(0), _transactionMode(kTransactionNone) {
// allocate palette storage
_currentPalette = (SDL_Color *)calloc(sizeof(SDL_Color), 256);
@@ -160,19 +160,7 @@ void OSystem_SDL::setFeatureState(Feature f, bool enable) {
setFullscreenMode(enable);
break;
case kFeatureAspectRatioCorrection:
- if (_screenHeight == 200 && _adjustAspectRatio != enable) {
- Common::StackLock lock(_graphicsMutex);
-
- //assert(_hwscreen != 0);
- _adjustAspectRatio ^= true;
- hotswap_gfx_mode();
-
- // Blit everything to the screen
- internUpdateScreen();
-
- // Make sure that an EVENT_SCREEN_CHANGED gets sent later
- _modeChanged = true;
- }
+ setAspectRatioCorrection(enable);
break;
case kFeatureAutoComputeDirtyRects:
if (enable)
@@ -186,6 +174,8 @@ void OSystem_SDL::setFeatureState(Feature f, bool enable) {
}
bool OSystem_SDL::getFeatureState(Feature f) {
+ assert (_transactionMode != kTransactionNone);
+
switch (f) {
case kFeatureFullscreenMode:
return _full_screen;