Move DisplayServer enums and typedefs to DisplayServerEnums
This will allow decoupling `display_server.h` from a number of headers in the codebase which only require those enums and not all the DisplayServer API.
This commit is contained in:
@@ -1947,12 +1947,12 @@ String EditorSettings::get_editor_layouts_config() const {
|
||||
float EditorSettings::get_auto_display_scale() {
|
||||
#ifdef LINUXBSD_ENABLED
|
||||
if (DisplayServer::get_singleton()->get_name() == "Wayland") {
|
||||
float main_window_scale = DisplayServer::get_singleton()->screen_get_scale(DisplayServer::SCREEN_OF_MAIN_WINDOW);
|
||||
float main_window_scale = DisplayServer::get_singleton()->screen_get_scale(DisplayServerEnums::SCREEN_OF_MAIN_WINDOW);
|
||||
|
||||
if (DisplayServer::get_singleton()->get_screen_count() == 1 || Math::fract(main_window_scale) != 0) {
|
||||
// If we have a single screen or the screen of the window is fractional, all
|
||||
// bets are off. At this point, let's just return the current's window scale,
|
||||
// which is special-cased to the scale of `SCREEN_OF_MAIN_WINDOW`.
|
||||
// which is special-cased to the scale of `DisplayServerEnums::SCREEN_OF_MAIN_WINDOW`.
|
||||
return main_window_scale;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user