diff options
author | Eugene Sandulenko | 2005-09-20 18:16:09 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-09-20 18:16:09 +0000 |
commit | aa33153569afda655b988a4c9a1efee261ca107e (patch) | |
tree | 7a9cbf46280a62bc8c582fa77e9939d4d8f883e6 /backends/sdl | |
parent | a0cff37f0697cd0082ca5fabac38159b265f4471 (diff) | |
download | scummvm-rg350-aa33153569afda655b988a4c9a1efee261ca107e.tar.gz scummvm-rg350-aa33153569afda655b988a4c9a1efee261ca107e.tar.bz2 scummvm-rg350-aa33153569afda655b988a4c9a1efee261ca107e.zip |
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.
svn-id: r18850
Diffstat (limited to 'backends/sdl')
-rw-r--r-- | backends/sdl/graphics.cpp | 20 | ||||
-rw-r--r-- | backends/sdl/sdl.cpp | 8 |
2 files changed, 21 insertions, 7 deletions
diff --git a/backends/sdl/graphics.cpp b/backends/sdl/graphics.cpp index 1f339da656..00e2d9625e 100644 --- a/backends/sdl/graphics.cpp +++ b/backends/sdl/graphics.cpp @@ -48,7 +48,7 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = { // 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 @@ bool OSystem_SDL::setGraphicsMode(int mode) { 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 @@ bool OSystem_SDL::setGraphicsMode(int mode) { newScaleFactor = 2; newScalerProc = DotMatrix; break; -#endif // __SYMBIAN32__ +#endif // DISABLE_SCALERS default: warning("unknown gfx mode %d", mode); @@ -208,7 +208,7 @@ bool OSystem_SDL::setGraphicsMode(int mode) { _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 @@ int OSystem_SDL::getGraphicsMode() const { } 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 @@ void OSystem_SDL::internUpdateScreen() { 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 @@ void OSystem_SDL::addDirtyRect(int x, int y, int w, int h, bool mouseRect) { 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 @@ void OSystem_SDL::blitCursor() { _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 @@ static int cursorStretch200To240(uint8 *buf, uint32 pitch, int width, int height return 1 + maxDstY - srcY; } +#endif void OSystem_SDL::toggleMouseGrab() { if (SDL_WM_GrabInput(SDL_GRAB_QUERY) == SDL_GRAB_OFF) diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp index 43042df8e4..6318519a0b 100644 --- a/backends/sdl/sdl.cpp +++ b/backends/sdl/sdl.cpp @@ -63,7 +63,7 @@ void OSystem_SDL::initBackend() { 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 @@ void OSystem_SDL::initBackend() { _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; |