[Scummvm-cvs-logs] CVS: scummvm sdl.cpp,1.85,1.86

Ludvig Strigeus strigeus at users.sourceforge.net
Sat Apr 13 04:33:03 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv30296

Modified Files:
	sdl.cpp 
Log Message:
fixed gfx glitch with 2xsai

Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sdl.cpp,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -d -r1.85 -r1.86
*** sdl.cpp	13 Apr 2002 04:39:04 -0000	1.85
--- sdl.cpp	13 Apr 2002 11:32:15 -0000	1.86
***************
*** 78,82 ****
  		DF_2xSAI = 4,
  		DF_SEPARATE_HWSCREEN = 8,
! 
  	};
  
--- 78,82 ----
  		DF_2xSAI = 4,
  		DF_SEPARATE_HWSCREEN = 8,
! 		DF_UPDATE_EXPAND_1_PIXEL = 16,
  	};
  
***************
*** 248,252 ****
  	if (_sai_func) {
  		uint16 *tmp_screen = (uint16*)calloc(320*204 + 16,sizeof(uint16));
! 		_driver_flags = DF_FORCE_FULL_ON_PALETTE | DF_WANT_RECT_OPTIM | DF_2xSAI | DF_SEPARATE_HWSCREEN;
  
  		Init_2xSaI(565);
--- 248,252 ----
  	if (_sai_func) {
  		uint16 *tmp_screen = (uint16*)calloc(320*204 + 16,sizeof(uint16));
! 		_driver_flags = DF_FORCE_FULL_ON_PALETTE | DF_WANT_RECT_OPTIM | DF_2xSAI | DF_SEPARATE_HWSCREEN | DF_UPDATE_EXPAND_1_PIXEL;
  
  		Init_2xSaI(565);
***************
*** 397,400 ****
--- 397,409 ----
  		SDL_Rect *r = &dirty_rect_list[num_dirty_rects++];
  		
+ 		/* Update the dirty region by 1 pixel for graphics drivers
+ 		 * that "smear" the screen */
+ 		if (_driver_flags & DF_UPDATE_EXPAND_1_PIXEL) {
+ 			x--;
+ 			y--;
+ 			w+=2;
+ 			h+=2;
+ 		}
+ 
  		/* clip */
  		if (x<0) { w+=x; x=0; }





More information about the Scummvm-git-logs mailing list