summaryrefslogtreecommitdiff
path: root/servers/display_server.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/display_server.h')
-rw-r--r--servers/display_server.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/servers/display_server.h b/servers/display_server.h
index a4fcd29a4a..79f6f5d0fc 100644
--- a/servers/display_server.h
+++ b/servers/display_server.h
@@ -167,6 +167,14 @@ public:
virtual Rect2i screen_get_usable_rect(int p_screen = SCREEN_OF_MAIN_WINDOW) const = 0;
virtual int screen_get_dpi(int p_screen = SCREEN_OF_MAIN_WINDOW) const = 0;
virtual float screen_get_scale(int p_screen = SCREEN_OF_MAIN_WINDOW) const;
+ virtual float screen_get_max_scale() const {
+ float scale = 1.f;
+ int screen_count = get_screen_count();
+ for (int i = 0; i < screen_count; i++) {
+ scale = fmax(scale, screen_get_scale(i));
+ }
+ return scale;
+ }
virtual bool screen_is_touchscreen(int p_screen = SCREEN_OF_MAIN_WINDOW) const;
enum ScreenOrientation {