From 703f0ca29c8f1915b5fae13decb6ccde110adada Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 15 Jun 2010 12:21:08 +0000 Subject: SYSTEM: Unify OSystem::getSupportedFormats() signature svn-id: r49838 --- backends/platform/dc/dc.h | 2 +- backends/platform/dc/display.cpp | 2 +- backends/platform/psp/display_manager.cpp | 2 +- backends/platform/psp/display_manager.h | 12 ++++++------ backends/platform/psp/osys_psp.cpp | 2 +- backends/platform/psp/osys_psp.h | 2 +- backends/platform/sdl/graphics.cpp | 2 +- backends/platform/sdl/sdl.h | 2 +- backends/platform/wii/osystem.h | 2 +- backends/platform/wii/osystem_gfx.cpp | 2 +- common/system.h | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index 8a122ebb27..e87a0a8c90 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 35fc94b3cc..53dbff333d 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 15e0188ebf..a9f33f6091 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 bceb85703d..dbbdf2022c 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 b0fb971230..580e4f1cfd 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 d8ec8fe824..56a64ccb80 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 82670cfcb7..83a256f568 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 341a59c8cf..480e0af41b 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 d277aa38b1..8180d5727f 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 3d4e75883b..19190048a0 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 60cea49f87..a09912b3a7 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(); -- cgit v1.2.3