GCW0: Fully disable the downscaling code

This commit is contained in:
Cameron Cawley 2020-03-20 16:34:16 +00:00 committed by Eugene Sandulenko
parent 153576f0b5
commit f2d323628d
3 changed files with 4 additions and 15 deletions

View File

@ -35,10 +35,6 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
{0, 0, 0} {0, 0, 0}
}; };
#ifndef USE_SCALERS
#define DownscaleAllByHalf 0
#endif
DINGUXSdlGraphicsManager::DINGUXSdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window) DINGUXSdlGraphicsManager::DINGUXSdlGraphicsManager(SdlEventSource *sdlEventSource, SdlWindow *window)
: SurfaceSdlGraphicsManager(sdlEventSource, window) { : SurfaceSdlGraphicsManager(sdlEventSource, window) {
} }
@ -55,9 +51,7 @@ int DINGUXSdlGraphicsManager::getGraphicsModeScale(int mode) const {
int scale; int scale;
switch (mode) { switch (mode) {
case GFX_NORMAL: case GFX_NORMAL:
#ifdef USE_SCALERS
case GFX_HALF: case GFX_HALF:
#endif
scale = 1; scale = 1;
break; break;
default: default:
@ -73,11 +67,9 @@ ScalerProc *DINGUXSdlGraphicsManager::getGraphicsScalerProc(int mode) const {
case GFX_NORMAL: case GFX_NORMAL:
newScalerProc = Normal1x; newScalerProc = Normal1x;
break; break;
#ifdef USE_SCALERS
case GFX_HALF: case GFX_HALF:
newScalerProc = DownscaleAllByHalf; newScalerProc = DownscaleAllByHalf;
break; break;
#endif
} }
return newScalerProc; return newScalerProc;
@ -114,13 +106,11 @@ void DINGUXSdlGraphicsManager::initSize(uint w, uint h, const Graphics::PixelFor
_videoMode.screenWidth = w; _videoMode.screenWidth = w;
_videoMode.screenHeight = h; _videoMode.screenHeight = h;
#ifndef GCW0
if (w > 320 || h > 240) { if (w > 320 || h > 240) {
setGraphicsMode(GFX_HALF); setGraphicsMode(GFX_HALF);
setGraphicsModeIntern(); setGraphicsModeIntern();
_window->toggleMouseGrab(); _window->toggleMouseGrab();
} }
#endif
_transactionDetails.sizeChanged = true; _transactionDetails.sizeChanged = true;
} }
@ -435,14 +425,11 @@ void DINGUXSdlGraphicsManager::setupHardwareSize() {
_videoMode.aspectRatioCorrection = false; _videoMode.aspectRatioCorrection = false;
} }
#ifndef GCW0
if (_videoMode.screenWidth > 320 || _videoMode.screenHeight > 240) { if (_videoMode.screenWidth > 320 || _videoMode.screenHeight > 240) {
_videoMode.aspectRatioCorrection = false; _videoMode.aspectRatioCorrection = false;
setGraphicsMode(GFX_HALF); setGraphicsMode(GFX_HALF);
debug("GraphicsMode set to HALF"); debug("GraphicsMode set to HALF");
} else } else {
#endif
{
setGraphicsMode(GFX_NORMAL); setGraphicsMode(GFX_NORMAL);
debug("GraphicsMode set to NORMAL"); debug("GraphicsMode set to NORMAL");
} }

View File

@ -33,10 +33,12 @@ void OSystem_SDL_Dingux::initBackend() {
if (_eventSource == 0) if (_eventSource == 0)
_eventSource = new DINGUXSdlEventSource(); _eventSource = new DINGUXSdlEventSource();
#ifndef GCW0
// Create the graphics manager // Create the graphics manager
if (_graphicsManager == 0) { if (_graphicsManager == 0) {
_graphicsManager = new DINGUXSdlGraphicsManager(_eventSource, _window); _graphicsManager = new DINGUXSdlGraphicsManager(_eventSource, _window);
} }
#endif
// Call parent implementation of this method // Call parent implementation of this method
OSystem_POSIX::initBackend(); OSystem_POSIX::initBackend();

2
configure vendored
View File

@ -3242,7 +3242,7 @@ if test -n "$_host"; then
_mt32emu=no _mt32emu=no
_seq_midi=no _seq_midi=no
_timidity=no _timidity=no
_build_scalers=yes _build_scalers=no
_optimization_level=-O3 _optimization_level=-O3
_vkeybd=yes _vkeybd=yes
_vorbis=no _vorbis=no