You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
[macOS, 3.2] Implement seamless display scaling.
This commit is contained in:
@@ -320,6 +320,14 @@ int _OS::get_screen_dpi(int p_screen) const {
|
||||
return OS::get_singleton()->get_screen_dpi(p_screen);
|
||||
}
|
||||
|
||||
float _OS::get_screen_scale(int p_screen) const {
|
||||
return OS::get_singleton()->get_screen_scale(p_screen);
|
||||
}
|
||||
|
||||
float _OS::get_screen_max_scale() const {
|
||||
return OS::get_singleton()->get_screen_max_scale();
|
||||
}
|
||||
|
||||
Point2 _OS::get_window_position() const {
|
||||
return OS::get_singleton()->get_window_position();
|
||||
}
|
||||
@@ -1252,6 +1260,8 @@ void _OS::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_screen_position", "screen"), &_OS::get_screen_position, DEFVAL(-1));
|
||||
ClassDB::bind_method(D_METHOD("get_screen_size", "screen"), &_OS::get_screen_size, DEFVAL(-1));
|
||||
ClassDB::bind_method(D_METHOD("get_screen_dpi", "screen"), &_OS::get_screen_dpi, DEFVAL(-1));
|
||||
ClassDB::bind_method(D_METHOD("get_screen_scale", "screen"), &_OS::get_screen_scale, DEFVAL(-1));
|
||||
ClassDB::bind_method(D_METHOD("get_screen_max_scale"), &_OS::get_screen_max_scale);
|
||||
ClassDB::bind_method(D_METHOD("get_window_position"), &_OS::get_window_position);
|
||||
ClassDB::bind_method(D_METHOD("set_window_position", "position"), &_OS::set_window_position);
|
||||
ClassDB::bind_method(D_METHOD("get_window_size"), &_OS::get_window_size);
|
||||
|
||||
Reference in New Issue
Block a user