[Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl.cpp,1.26,1.27

Max Horn fingolfin at users.sourceforge.net
Wed Apr 30 11:08:05 CEST 2003


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

Modified Files:
	sdl.cpp 
Log Message:
avoid unneccesary blits

Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- sdl.cpp	25 Apr 2003 20:02:58 -0000	1.26
+++ sdl.cpp	30 Apr 2003 18:07:17 -0000	1.27
@@ -277,17 +277,17 @@
 		if (!_overlayVisible) {
 			for(r = _dirty_rect_list; r != last_rect; ++r) {
 				dst = *r;
-				dst.x++;	// Shift rect by one since 2xSai needs to acces the data around
-				dst.y++;	// any pixel to scale it, and we want to avoid mem access crashes.
 				if (_scaler_proc == Normal1x) {
 					if (SDL_BlitSurface(_screen, r, _hwscreen, &dst) != 0)
 						error("SDL_BlitSurface failed: %s", SDL_GetError());
 				} else {
+					dst.x++;	// Shift rect by one since 2xSai needs to acces the data around
+					dst.y++;	// any pixel to scale it, and we want to avoid mem access crashes.
 					if (SDL_BlitSurface(_screen, r, _tmpscreen, &dst) != 0)
 						error("SDL_BlitSurface failed: %s", SDL_GetError());
 				}
 			}
-		} else {
+		} else if (_scaler_proc == Normal1x) {
 			for(r = _dirty_rect_list; r != last_rect; ++r) {
 				dst = *r;
 				if (SDL_BlitSurface(_tmpscreen, r, _hwscreen, &dst) != 0)





More information about the Scummvm-git-logs mailing list