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:
Rémi Verschelde
2026-02-26 12:36:47 +01:00
parent 778cf54dab
commit a447ac95ec
160 changed files with 4584 additions and 4520 deletions
+2 -2
View File
@@ -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;
}