diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index 8a122ebb278..e87a0a8c904 100644 --- a/backends/platform/dc/dc.h +++ b/backends/platform/dc/dc.h @@ -86,7 +86,7 @@ class OSystem_Dreamcast : private DCHardware, public BaseBackend, public Filesys Graphics::PixelFormat getScreenFormat() const; // Returns a list of all pixel formats supported by the backend. - Common::List getSupportedFormats(); + Common::List getSupportedFormats() const; // Set the size of the video bitmap. // Typically, 320x200 diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp index 35fc94b3cca..53dbff333d6 100644 --- a/backends/platform/dc/display.cpp +++ b/backends/platform/dc/display.cpp @@ -198,7 +198,7 @@ Graphics::PixelFormat OSystem_Dreamcast::getScreenFormat() const return screenFormats[_screenFormat]; } -Common::List OSystem_Dreamcast::getSupportedFormats() +Common::List OSystem_Dreamcast::getSupportedFormats() const { Common::List list; unsigned i; diff --git a/backends/platform/psp/display_manager.cpp b/backends/platform/psp/display_manager.cpp index 15e0188ebfb..a9f33f60918 100644 --- a/backends/platform/psp/display_manager.cpp +++ b/backends/platform/psp/display_manager.cpp @@ -379,7 +379,7 @@ inline bool DisplayManager::isTimeToUpdate() { return true; } -Common::List DisplayManager::getSupportedPixelFormats() { +Common::List DisplayManager::getSupportedPixelFormats() const { Common::List list; // In order of preference diff --git a/backends/platform/psp/display_manager.h b/backends/platform/psp/display_manager.h index bceb85703db..dbbdf2022ce 100644 --- a/backends/platform/psp/display_manager.h +++ b/backends/platform/psp/display_manager.h @@ -83,12 +83,12 @@ public: void setSizeAndPixelFormat(uint width, uint height, const Graphics::PixelFormat *format); // Getters - float getScaleX() { return _displayParams.scaleX; } - float getScaleY() { return _displayParams.scaleY; } - uint32 getOutputWidth() { return _displayParams.screenOutput.width; } - uint32 getOutputHeight() { return _displayParams.screenOutput.height; } - uint32 getOutputBitsPerPixel() { return _displayParams.outputBitsPerPixel; } - Common::List getSupportedPixelFormats(); + float getScaleX() const { return _displayParams.scaleX; } + float getScaleY() const { return _displayParams.scaleY; } + uint32 getOutputWidth() const { return _displayParams.screenOutput.width; } + uint32 getOutputHeight() const { return _displayParams.screenOutput.height; } + uint32 getOutputBitsPerPixel() const { return _displayParams.outputBitsPerPixel; } + Common::List getSupportedPixelFormats() const; private: struct GlobalDisplayParams { diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index b0fb9712307..580e4f1cfd0 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -148,7 +148,7 @@ Graphics::PixelFormat OSystem_PSP::getScreenFormat() const { return _screen.getScummvmPixelFormat(); } -Common::List OSystem_PSP::getSupportedFormats() { +Common::List OSystem_PSP::getSupportedFormats() const { return _displayManager.getSupportedPixelFormats(); } diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h index d8ec8fe824e..56a64ccb806 100644 --- a/backends/platform/psp/osys_psp.h +++ b/backends/platform/psp/osys_psp.h @@ -87,7 +87,7 @@ public: int getGraphicsMode() const; #ifdef USE_RGB_COLOR virtual Graphics::PixelFormat getScreenFormat() const; - virtual Common::List getSupportedFormats(); + virtual Common::List getSupportedFormats() const; #endif // Screen size diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index 82670cfcb79..83a256f568f 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -243,7 +243,7 @@ const Graphics::PixelFormat BGRList[] = { }; // TODO: prioritize matching alpha masks -Common::List OSystem_SDL::getSupportedFormats() { +Common::List OSystem_SDL::getSupportedFormats() const { static Common::List list; static bool inited = false; diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h index 341a59c8cfd..480e0af41b5 100644 --- a/backends/platform/sdl/sdl.h +++ b/backends/platform/sdl/sdl.h @@ -98,7 +98,7 @@ public: virtual Graphics::PixelFormat getScreenFormat() const { return _screenFormat; } // Highest supported - virtual Common::List getSupportedFormats(); + virtual Common::List getSupportedFormats() const; #endif // Set the size and format of the video bitmap. diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h index d277aa38b1a..8180d5727f3 100644 --- a/backends/platform/wii/osystem.h +++ b/backends/platform/wii/osystem.h @@ -156,7 +156,7 @@ public: virtual bool setGraphicsMode(int mode); #ifdef USE_RGB_COLOR virtual Graphics::PixelFormat getScreenFormat() const; - virtual Common::List getSupportedFormats(); + virtual Common::List getSupportedFormats() const; #endif virtual int getGraphicsMode() const; virtual void initSize(uint width, uint height, diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index 3d4e75883b6..19190048a0e 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -209,7 +209,7 @@ Graphics::PixelFormat OSystem_Wii::getScreenFormat() const { return _pfGame; } -Common::List OSystem_Wii::getSupportedFormats() { +Common::List OSystem_Wii::getSupportedFormats() const { Common::List res; res.push_back(_pfRGB565); res.push_back(Graphics::PixelFormat::createFormatCLUT8()); diff --git a/common/system.h b/common/system.h index 60cea49f873..a09912b3a71 100644 --- a/common/system.h +++ b/common/system.h @@ -383,7 +383,7 @@ public: * @note Backends supporting RGB color should accept game data in RGB color * order, even if hardware uses BGR or some other color order. */ - virtual Common::List getSupportedFormats() = 0; + virtual Common::List getSupportedFormats() const = 0; #else inline Graphics::PixelFormat getScreenFormat() const { return Graphics::PixelFormat::createFormatCLUT8();