diff options
author | Cameron Cawley | 2019-07-26 19:17:57 +0100 |
---|---|---|
committer | Filippos Karapetis | 2019-08-11 14:27:52 +0300 |
commit | 9b6461122e237a02a9cab6e7ee7a11b236f5d69f (patch) | |
tree | d2ace55ae9f8872a9af926210c019a6e0d1bc86c /backends/graphics/linuxmotosdl | |
parent | 6b8869fc64c32054a026fe0aa9d03fff6f53e310 (diff) | |
download | scummvm-rg350-9b6461122e237a02a9cab6e7ee7a11b236f5d69f.tar.gz scummvm-rg350-9b6461122e237a02a9cab6e7ee7a11b236f5d69f.tar.bz2 scummvm-rg350-9b6461122e237a02a9cab6e7ee7a11b236f5d69f.zip |
SDL: Move selecting the required ScalerProc into a separate function
Diffstat (limited to 'backends/graphics/linuxmotosdl')
-rw-r--r-- | backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp | 19 | ||||
-rw-r--r-- | backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h | 2 |
2 files changed, 3 insertions, 18 deletions
diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp index 7ca4202045..45546c10e7 100644 --- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp +++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp @@ -71,10 +71,8 @@ int LinuxmotoSdlGraphicsManager::getGraphicsModeScale(int mode) const { return scale; } -void LinuxmotoSdlGraphicsManager::setGraphicsModeIntern() { - Common::StackLock lock(_graphicsMutex); +ScalerProc *LinuxmotoSdlGraphicsManager::getGraphicsScalerProc(int mode) const { ScalerProc *newScalerProc = 0; - switch (_videoMode.mode) { case GFX_NORMAL: newScalerProc = Normal1x; @@ -82,22 +80,9 @@ void LinuxmotoSdlGraphicsManager::setGraphicsModeIntern() { case GFX_HALF: newScalerProc = DownscaleAllByHalf; break; - - default: - error("Unknown gfx mode %d", _videoMode.mode); } - _scalerProc = newScalerProc; - - if (!_screen || !_hwscreen) - return; - - // Blit everything to the screen - _forceFull = true; - - // Even if the old and new scale factors are the same, we may have a - // different scaler for the cursor now. - blitCursor(); + return newScalerProc; } void LinuxmotoSdlGraphicsManager::initSize(uint w, uint h, const Graphics::PixelFormat *format) { diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h index cc2af5ff0c..ed10ba9d73 100644 --- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h +++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h @@ -33,7 +33,7 @@ public: virtual void setGraphicsModeIntern() override; virtual int getGraphicsModeScale(int mode) const override; virtual void internUpdateScreen() override; - virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const override; + virtual ScalerProc *getGraphicsScalerProc(int mode) const override; virtual int getDefaultGraphicsMode() const override; virtual bool loadGFXMode() override; virtual void drawMouse() override; |