summaryrefslogtreecommitdiff
path: root/src/graphics.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics.h')
-rw-r--r--src/graphics.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/graphics.h b/src/graphics.h
index 813d4200..f92374ec 100644
--- a/src/graphics.h
+++ b/src/graphics.h
@@ -112,7 +112,7 @@ class Graphics : public gcn::Graphics
bool drawImage(Image *image, int x, int y);
/**
- * Draws a resclaled version of the image
+ * Draws a rescaled version of the image.
*/
bool drawRescaledImage(Image *image, int srcX, int srcY,
int dstX, int dstY,
@@ -125,7 +125,7 @@ class Graphics : public gcn::Graphics
false); }
/**
- * Draws a resclaled version of the image
+ * Draws a rescaled version of the image.
*/
virtual bool drawRescaledImage(Image *image, int srcX, int srcY,
int dstX, int dstY,
@@ -195,12 +195,17 @@ class Graphics : public gcn::Graphics
/**
* Returns the width of the screen.
*/
- int getWidth() const;
+ int getWidth() const { return mWidth; }
/**
* Returns the height of the screen.
*/
- int getHeight() const;
+ int getHeight() const { return mHeight; }
+
+ /**
+ * Returns the current scale ratio of the screen.
+ */
+ int getScale() const { return mScale; }
/**
* Returns whether we're in a full screen mode.
@@ -246,14 +251,17 @@ class Graphics : public gcn::Graphics
protected:
void updateSDLClipRect();
+ int getScale(int w, int h);
int mWidth = 0;
int mHeight = 0;
+ int mScale = 1;
bool mFullscreen = false;
gcn::Color mColor;
SDL_Window *mTarget = nullptr;
SDL_Renderer *mRenderer = nullptr;
+ SDL_Texture *mScreenTexture = nullptr;
};
extern Graphics *graphics;