diff options
author | Cameron Cawley | 2019-12-12 23:01:10 +0000 |
---|---|---|
committer | Filippos Karapetis | 2019-12-15 16:06:56 +0200 |
commit | e92ac655be8ec5af44e00c5601380bd8f62ff70e (patch) | |
tree | e0f92900a055ae285dce7d2301ec626f4400afe7 /common/system.h | |
parent | 2dc8b845c1768fda50943f6e9a78a8e6c3c361b6 (diff) | |
download | scummvm-rg350-e92ac655be8ec5af44e00c5601380bd8f62ff70e.tar.gz scummvm-rg350-e92ac655be8ec5af44e00c5601380bd8f62ff70e.tar.bz2 scummvm-rg350-e92ac655be8ec5af44e00c5601380bd8f62ff70e.zip |
BACKENDS: Add default implementation for GraphicsMode functions
Diffstat (limited to 'common/system.h')
-rw-r--r-- | common/system.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/common/system.h b/common/system.h index ca3f269d9c..2556795acb 100644 --- a/common/system.h +++ b/common/system.h @@ -559,7 +559,10 @@ public: * The list is terminated by an all-zero entry. * @return a list of supported graphics modes */ - virtual const GraphicsMode *getSupportedGraphicsModes() const = 0; + virtual const GraphicsMode *getSupportedGraphicsModes() const { + static const GraphicsMode noGraphicsModes[] = {{"NONE", "Normal", 0}, {nullptr, nullptr, 0 }}; + return noGraphicsModes; + } /** * Return the ID of the 'default' graphics mode. What exactly this means @@ -569,7 +572,7 @@ public: * * @return the ID of the 'default' graphics mode */ - virtual int getDefaultGraphicsMode() const = 0; + virtual int getDefaultGraphicsMode() const { return 0; } /** * Switch to the specified graphics mode. If switching to the new mode @@ -578,7 +581,7 @@ public: * @param mode the ID of the new graphics mode * @return true if the switch was successful, false otherwise */ - virtual bool setGraphicsMode(int mode) = 0; + virtual bool setGraphicsMode(int mode) { return (mode == 0); } /** * Switch to the graphics mode with the given name. If 'name' is unknown, @@ -596,7 +599,7 @@ public: * Determine which graphics mode is currently active. * @return the ID of the active graphics mode */ - virtual int getGraphicsMode() const = 0; + virtual int getGraphicsMode() const { return 0; } /** * Sets the graphics scale factor to x1. Games with large screen sizes |