[Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl-common.h,1.40,1.41 sdl.cpp,1.50,1.51

Max Horn fingolfin at users.sourceforge.net
Fri Oct 3 18:09:38 CEST 2003


Update of /cvsroot/scummvm/scummvm/backends/sdl
In directory sc8-pr-cvs1:/tmp/cvs-serv3099

Modified Files:
	sdl-common.h sdl.cpp 
Log Message:
small remark

Index: sdl-common.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl-common.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- sdl-common.h	1 Oct 2003 10:47:18 -0000	1.40
+++ sdl-common.h	4 Oct 2003 00:12:30 -0000	1.41
@@ -40,7 +40,7 @@
 
 	// 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);
 

Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- sdl.cpp	27 Sep 2003 23:41:57 -0000	1.50
+++ sdl.cpp	4 Oct 2003 00:12:30 -0000	1.51
@@ -144,6 +144,13 @@
 		// 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();
 	}





More information about the Scummvm-git-logs mailing list