aboutsummaryrefslogtreecommitdiff
path: root/backends/sdl/sdl.cpp
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/sdl.cpp
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/sdl.cpp')
-rw-r--r--backends/sdl/sdl.cpp7
1 files changed, 7 insertions, 0 deletions
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();
}