aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/windowed.h
diff options
context:
space:
mode:
authorCameron Cawley2019-11-01 11:39:46 +0000
committerAntoniou Athanasios2019-11-01 13:39:46 +0200
commit177d709909808313eee720ce76465cf99f909c5e (patch)
tree6d11f166342ddea46deb1634b106d010b4ab5181 /backends/graphics/windowed.h
parent5d0206b9c297837fddb038601bdfb42b0fcb8016 (diff)
downloadscummvm-rg350-177d709909808313eee720ce76465cf99f909c5e.tar.gz
scummvm-rg350-177d709909808313eee720ce76465cf99f909c5e.tar.bz2
scummvm-rg350-177d709909808313eee720ce76465cf99f909c5e.zip
OPENGL: Implement high DPI support on Android (#1895)
* OPENGL: Implement high DPI support on Android * PSP2: Fix build
Diffstat (limited to 'backends/graphics/windowed.h')
-rw-r--r--backends/graphics/windowed.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/backends/graphics/windowed.h b/backends/graphics/windowed.h
index 74933a1727..549739d987 100644
--- a/backends/graphics/windowed.h
+++ b/backends/graphics/windowed.h
@@ -49,6 +49,8 @@ public:
_cursorVisible(false),
_cursorX(0),
_cursorY(0),
+ _xdpi(90),
+ _ydpi(90),
_cursorNeedsRedraw(false),
_cursorLastInActiveArea(true) {}
@@ -93,7 +95,7 @@ protected:
* Backend-specific implementation for updating internal surfaces that need
* to reflect the new window size.
*/
- virtual void handleResizeImpl(const int width, const int height) = 0;
+ virtual void handleResizeImpl(const int width, const int height, const int xdpi, const int ydpi) = 0;
/**
* Converts the given point from the active virtual screen's coordinate
@@ -172,10 +174,12 @@ protected:
* @param width The new width of the window, excluding window decoration.
* @param height The new height of the window, excluding window decoration.
*/
- void handleResize(const int width, const int height) {
+ void handleResize(const int width, const int height, const int xdpi, const int ydpi) {
_windowWidth = width;
_windowHeight = height;
- handleResizeImpl(width, height);
+ _xdpi = xdpi;
+ _ydpi = ydpi;
+ handleResizeImpl(width, height, xdpi, ydpi);
}
/**
@@ -276,6 +280,11 @@ protected:
int _windowHeight;
/**
+ * The DPI of the window.
+ */
+ int _xdpi, _ydpi;
+
+ /**
* Whether the overlay (i.e. launcher, including the out-of-game launcher)
* is visible or not.
*/