[Scummvm-cvs-logs] CVS: scummvm/backends/sdl graphics.cpp,1.54,1.55 sdl.cpp,1.86,1.87

Eugene Sandulenko sev at users.sourceforge.net
Tue Sep 20 11:17:34 CEST 2005


Update of /cvsroot/scummvm/scummvm/backends/sdl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19154/backends/sdl

Modified Files:
	graphics.cpp sdl.cpp 
Log Message:
Normalize use of DISABLE_SCALERS. Now it really disables all scalers
except essential Normal1x. Also thumbnails get compiled unconditionally
so we get them on all platforms, even those which never display them.

Sorted out mess brought to sdl backend by epoc maintainer. He misused
__SYMBIAN32__ where DISABLE_SCALERS is more appropriate.


Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/graphics.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- graphics.cpp	15 Aug 2005 01:23:41 -0000	1.54
+++ graphics.cpp	20 Sep 2005 18:16:08 -0000	1.55
@@ -48,7 +48,7 @@
 // Table of relative scalers magnitudes
 // [definedScale - 1][_scaleFactor - 1]
 static ScalerProc *scalersMagn[3][3] = {
-#ifndef __SYMBIAN32__
+#ifndef DISABLE_SCALERS
 	{ Normal1x, AdvMame2x, AdvMame3x },
 	{ Normal1x, Normal1x, Normal1o5x },
 	{ Normal1x, Normal1x, Normal1x }
@@ -151,7 +151,7 @@
 		newScaleFactor = 1;
 		newScalerProc = Normal1x;
 		break;
-#ifndef __SYMBIAN32__ // remove dependencies on other scalers
+#ifndef DISABLE_SCALERS
 	case GFX_DOUBLESIZE:
 		newScaleFactor = 2;
 		newScalerProc = Normal2x;
@@ -199,7 +199,7 @@
 		newScaleFactor = 2;
 		newScalerProc = DotMatrix;
 		break;
-#endif // __SYMBIAN32__
+#endif // DISABLE_SCALERS
 
 	default:
 		warning("unknown gfx mode %d", mode);
@@ -208,7 +208,7 @@
 
 	_transactionDetails.normal1xScaler = (mode == GFX_NORMAL);
 
-#ifndef __SYMBIAN32__ // this code introduces a dependency on Normal2x()
+#ifndef DISABLE_SCALERS
 	// Do not let switch to lesser than overlay size resolutions
 	if (_screenWidth * newScaleFactor < _overlayWidth) {
 		if (_scaleFactor == 1) { // Force 2x mode
@@ -284,6 +284,10 @@
 }
 
 void OSystem_SDL::initSize(uint w, uint h, int overlayScale) {
+#ifdef DISABLE_SCALERS
+	overlayScale = 1;
+#endif
+
 	// Avoid redundant res changes
 	if ((int)w == _screenWidth && (int)h == _screenHeight &&
 		 (int)overlayScale == _overlayScale &&
@@ -669,7 +673,7 @@
 				r->w = r->w * scale1 / scale2;
 				r->h = dst_h * scale1 / scale2;
 
-#ifndef __SYMBIAN32__ // don't want to introduce dep on aspect.cpp
+#ifndef DISABLE_SCALERS
 				if (_adjustAspectRatio && orig_dst_y < height)
 					r->h = stretch200To240((uint8 *) _hwscreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1 / scale2);
 #endif
@@ -930,7 +934,7 @@
 		h = height - y;
 	}
 
-#ifndef __SYMBIAN32__  // don't want to introduce dep on aspect.cpp
+#ifndef DISABLE_SCALERS
 	if (_adjustAspectRatio) {
 		makeRectStretchable(x, y, w, h);
 		if (_scaleFactor == 3 && _overlayScale == 2 && _overlayVisible) {
@@ -1406,13 +1410,16 @@
 		_mouseOrigSurface->pitch, (byte *)_mouseSurface->pixels, _mouseSurface->pitch,
 		_mouseCurState.w, _mouseCurState.h);
 
+#ifndef DISABLE_SCALERS
 	if (_adjustAspectRatio)
 		cursorStretch200To240((uint8 *)_mouseSurface->pixels, _mouseSurface->pitch, hW, hH1, 0, 0, 0);
+#endif
 
 	SDL_UnlockSurface(_mouseSurface);
 	SDL_UnlockSurface(_mouseOrigSurface);
 }
 
+#ifndef DISABLE_SCALERS
 // Basically it is kVeryFastAndUglyAspectMode of stretch200To240 from
 // common/scale/aspect.cpp
 static int cursorStretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY) {
@@ -1432,6 +1439,7 @@
 
 	return 1 + maxDstY - srcY;
 }
+#endif
 
 void OSystem_SDL::toggleMouseGrab() {
 	if (SDL_WM_GrabInput(SDL_GRAB_QUERY) == SDL_GRAB_OFF)

Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl.cpp,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- sdl.cpp	30 Jul 2005 21:10:55 -0000	1.86
+++ sdl.cpp	20 Sep 2005 18:16:09 -0000	1.87
@@ -63,7 +63,7 @@
 	SDL_EnableUNICODE(1);
 
 	_cksumValid = false;
-#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) && !defined(DISABLE_SCALERS)
 	_mode = GFX_DOUBLESIZE;
 	_scaleFactor = 2;
 	_scalerProc = Normal2x;
@@ -73,7 +73,13 @@
 	_mode = GFX_NORMAL;
 	_scaleFactor = 1;
 	_scalerProc = Normal1x;
+
+#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+	_fullscreen = ConfMan.getBool("fullscreen");
+#else
 	_fullscreen = true;
+#endif
+
 	_adjustAspectRatio = false;
 #endif
 	_scalerType = 0;





More information about the Scummvm-git-logs mailing list