Permalink
Browse files

BACKENDS: Make initSizeHint an optional extension point

There is no particular reason why backends that don't need to
calculate screen dimensions in advance should still need to
implement initSizeHint at this point.
  • Loading branch information...
csnover committed Oct 7, 2017
1 parent 6e15742 commit 04f357e6ff0c7c2b5c11d853fc3e40d0b4cdd391
Showing with 2 additions and 2 deletions.
  1. +1 −1 backends/graphics/graphics.h
  2. +1 −1 common/system.h
@@ -59,7 +59,7 @@ class GraphicsManager : public PaletteManager {
virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const = 0;
#endif
virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL) = 0;
virtual void initSizeHint(const Graphics::ModeList &modes) = 0;
virtual void initSizeHint(const Graphics::ModeList &modes) {}
virtual int getScreenChangeID() const = 0;
virtual void beginGFXTransaction() = 0;
View
@@ -644,7 +644,7 @@ class OSystem : Common::NonCopyable {
*
* @param modes the list of graphics modes the engine will probably use.
*/
virtual void initSizeHint(const Graphics::ModeList &modes) = 0;
virtual void initSizeHint(const Graphics::ModeList &modes) {}
/**
* Return an int value which is changed whenever any screen

0 comments on commit 04f357e

Please sign in to comment.