From a0b2deb4192bddad4d061f5d5df86411a437f01f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 28 Jan 2014 00:30:51 +0300 Subject: add support for screen scale in OpenGL modes. --- src/render/graphics.h | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'src/render/graphics.h') diff --git a/src/render/graphics.h b/src/render/graphics.h index 82ef32fea..adf1b97c4 100644 --- a/src/render/graphics.h +++ b/src/render/graphics.h @@ -127,9 +127,13 @@ class Graphics : public gcn::Graphics /** * Try to create a window with the given settings. */ - virtual bool setVideoMode(const int w, const int h, const int bpp, - const bool fs, const bool hwaccel, - const bool resize, const bool noFrame) = 0; + virtual bool setVideoMode(const int w, const int h, + const int scale, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, + const bool noFrame) = 0; /** * Set fullscreen mode. @@ -341,8 +345,16 @@ class Graphics : public gcn::Graphics virtual void completeCache() = 0; + int getScale() const + { return mScale; } + + virtual bool allowScale() const + { return false; } + int mWidth; int mHeight; + int mActualWidth; + int mActualHeight; protected: /** @@ -350,9 +362,13 @@ class Graphics : public gcn::Graphics */ Graphics(); - void setMainFlags(const int w, const int h, const int bpp, - const bool fs, const bool hwaccel, - const bool resize, const bool noFrame); + void setMainFlags(const int w, const int h, + const int scale, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, + const bool noFrame); int getOpenGLFlags() const A_WARN_UNUSED; @@ -386,6 +402,7 @@ class Graphics : public gcn::Graphics std::string mName; int mStartFreeMem; bool mSync; + int mScale; gcn::Color mColor; gcn::Color mColor2; }; -- cgit v1.2.3-60-g2f50