From afd9119d373e24f457a542b6a5960057a5c6b171 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 4 Oct 2003 00:12:30 +0000 Subject: small remark svn-id: r10579 --- backends/sdl/sdl-common.h | 2 +- backends/sdl/sdl.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'backends') 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(); } -- cgit v1.2.3