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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/servers/display_server.h b/servers/display_server.h
index 8c6586dc20..b54bba5058 100644
--- a/servers/display_server.h
+++ b/servers/display_server.h
@@ -174,6 +174,8 @@ public:
SCREEN_OF_MAIN_WINDOW = -1
};
+ const float SCREEN_REFRESH_RATE_FALLBACK = 60.0; // Returned by screen_get_refresh_rate if the method fails. Most screens are 60hz as of 2022.
+
virtual int get_screen_count() const = 0;
virtual Point2i screen_get_position(int p_screen = SCREEN_OF_MAIN_WINDOW) const = 0;
virtual Size2i screen_get_size(int p_screen = SCREEN_OF_MAIN_WINDOW) const = 0;
@@ -188,6 +190,7 @@ public:
}
return scale;
}
+ virtual float screen_get_refresh_rate(int p_screen = SCREEN_OF_MAIN_WINDOW) const = 0;
virtual bool screen_is_touchscreen(int p_screen = SCREEN_OF_MAIN_WINDOW) const;
// Keep the ScreenOrientation enum values in sync with the `display/window/handheld/orientation`