diff options
-rw-r--r-- | backends/sdl/sdl-common.h | 2 | ||||
-rw-r--r-- | backends/sdl/sdl.cpp | 7 |
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(); } |