aboutsummaryrefslogtreecommitdiff
path: root/backends/sdl
diff options
context:
space:
mode:
authorMax Horn2003-10-04 00:12:30 +0000
committerMax Horn2003-10-04 00:12:30 +0000
commitafd9119d373e24f457a542b6a5960057a5c6b171 (patch)
treebbea71e45b6eb09c70659fc45f389c1b42ae5ff8 /backends/sdl
parentad293a5ab8bf59f9535a4e8fbb3681c76f28128e (diff)
downloadscummvm-rg350-afd9119d373e24f457a542b6a5960057a5c6b171.tar.gz
scummvm-rg350-afd9119d373e24f457a542b6a5960057a5c6b171.tar.bz2
scummvm-rg350-afd9119d373e24f457a542b6a5960057a5c6b171.zip
small remark
svn-id: r10579
Diffstat (limited to 'backends/sdl')
-rw-r--r--backends/sdl/sdl-common.h2
-rw-r--r--backends/sdl/sdl.cpp7
2 files changed, 8 insertions, 1 deletions
diff --git a/backends/sdl/sdl-common.h b/backends/sdl/sdl-common.h
index 2b37d13848..77d8b0384d 100644
--- a/backends/sdl/sdl-common.h
+++ b/backends/sdl/sdl-common.h
@@ -40,7 +40,7 @@ public:
// Draw a bitmap to screen.
// The screen will not be updated to reflect the new bitmap
- void copy_rect(const byte *buf, int pitch, int x, int y, int w, int h);
+ void copy_rect(const byte *src, int pitch, int x, int y, int w, int h);
void move_screen(int dx, int dy, int height);
diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp
index c4eed72bc3..ad1c0d813c 100644
--- a/backends/sdl/sdl.cpp
+++ b/backends/sdl/sdl.cpp
@@ -144,6 +144,13 @@ void OSystem_SDL::load_gfx_mode() {
// We need to find a way to call SDL_VideoModeOK *before*
// that happens and revert to all the old settings if we
// can't pull off the switch to the new settings.
+ //
+ // Fingolfin says: the "easy" way to do that is not to modify
+ // the member vars before we are sure everything is fine. Think
+ // of "transactions, commit, rollback" style... we use local vars
+ // in place of the member vars, do everything etc. etc.. In case
+ // of a failure, rollback is trivial. Only if everything worked fine
+ // do we "commit" the changed values to the member vars.
warning("SDL_SetVideoMode says we can't switch to that mode");
quit();
}