diff options
author | Juan Linietsky <reduz@Juans-MBP.fibertel.com.ar> | 2016-05-30 00:28:29 -0300 |
---|---|---|
committer | Juan Linietsky <reduz@Juans-MBP.fibertel.com.ar> | 2016-05-30 00:28:29 -0300 |
commit | 9b1f8230ec435d9289b53afa8da02367daf8b5af (patch) | |
tree | caa9383d77d9865cfa8e41c0ca0e74318d2d9365 /platform/osx/os_osx.h | |
parent | c7d24b7814b335fb9503f6a957ac5923a47da161 (diff) |
-Some fixes to OSX retina scaling for window functions
-Implemented HiDPI detection and support for Godot Editor!
Diffstat (limited to 'platform/osx/os_osx.h')
-rw-r--r-- | platform/osx/os_osx.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index d88dd89002..8d64686335 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -59,7 +59,7 @@ public: bool force_quit; Rasterizer *rasterizer; VisualServer *visual_server; - VideoMode current_videomode; + List<String> args; MainLoop *main_loop; unsigned int event_id; @@ -104,9 +104,22 @@ public: bool minimized; bool maximized; bool zoomed; + Vector<Rect2> screens; + Vector<int> screen_dpi; + + Size2 window_size; int current_screen; Rect2 restore_rect; + + float _mouse_scale(float p_scale) { + if (display_scale>1.0) + return p_scale; + else + return 1.0; + } + + float display_scale; protected: virtual int get_video_driver_count() const; @@ -173,6 +186,9 @@ public: virtual int get_current_screen() const; virtual void set_current_screen(int p_screen); virtual Point2 get_screen_position(int p_screen=0) const; + virtual Size2 get_screen_size(int p_screen=0) const; + virtual int get_screen_dpi(int p_screen=0) const; + virtual Point2 get_window_position() const; virtual void set_window_position(const Point2& p_position); virtual void set_window_size(const Size2 p_size); @@ -184,7 +200,6 @@ public: virtual bool is_window_minimized() const; virtual void set_window_maximized(bool p_enabled); virtual bool is_window_maximized() const; - Size2 get_screen_size(int p_screen=0) const; void run(); |