From 2f9be29c73dec490671725a9d003dd158c0e47f2 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Thu, 4 Aug 2022 10:38:26 +0300 Subject: Implement `screen_set_keep_on` for macOS --- platform/macos/display_server_macos.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'platform/macos/display_server_macos.h') diff --git a/platform/macos/display_server_macos.h b/platform/macos/display_server_macos.h index 41031ec81b..65f9a3d4b8 100644 --- a/platform/macos/display_server_macos.h +++ b/platform/macos/display_server_macos.h @@ -50,6 +50,7 @@ #import #import #import +#import #undef BitMap #undef CursorShape @@ -171,6 +172,8 @@ private: HashMap windows; + IOPMAssertionID screen_keep_on_assertion = kIOPMNullAssertionID; + const NSMenu *_get_menu_root(const String &p_menu_root) const; NSMenu *_get_menu_root(const String &p_menu_root); @@ -299,6 +302,7 @@ public: virtual float screen_get_max_scale() const override; virtual Rect2i screen_get_usable_rect(int p_screen = SCREEN_OF_MAIN_WINDOW) const override; virtual float screen_get_refresh_rate(int p_screen = SCREEN_OF_MAIN_WINDOW) const override; + virtual void screen_set_keep_on(bool p_enable) override; virtual Vector get_window_list() const override; -- cgit v1.2.3