From bfc193be261507e4f72d83b5346e147cbb2aa0ff Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 5 Aug 2026 19:09:19 +0200 Subject: [PATCH] Fix incorrect note about `DisplayServer.screen_get_max_scale()` only working on macOS (cherry picked from commit 9b012119154d72489305f7c460b13fd6e9f4fbdc) --- doc/classes/DisplayServer.xml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 367d42ad43..52657f7fb6 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -1785,9 +1785,8 @@ - Returns the greatest scale factor of all screens. - [b]Note:[/b] On macOS returned value is [code]2.0[/code] if there is at least one hiDPI (Retina) screen in the system, and [code]1.0[/code] in all other cases. - [b]Note:[/b] This method is implemented only on macOS. + Returns the greatest scale factor of all screens. See also [method screen_get_scale]. + [b]Note:[/b] On macOS, the returned value is [code]2.0[/code] if there is at least one hiDPI (Retina) screen in the system, and [code]1.0[/code] in all other cases. @@ -1844,7 +1843,7 @@ - Returns the scale factor of the specified screen by index. Returns [code]1.0[/code] if [param screen] is invalid. + Returns the scale factor of the specified screen by index. Returns [code]1.0[/code] if [param screen] is invalid. See also [method screen_get_max_scale]. [b]Note:[/b] One of the following constants can be used as [param screen]: [constant SCREEN_OF_MAIN_WINDOW], [constant SCREEN_PRIMARY], [constant SCREEN_WITH_MOUSE_FOCUS], or [constant SCREEN_WITH_KEYBOARD_FOCUS]. [b]Note:[/b] On macOS, the returned value is [code]2.0[/code] for hiDPI (Retina) screens, and [code]1.0[/code] for all other cases. [b]Note:[/b] On Linux (Wayland), the returned value is accurate only when [param screen] is [constant SCREEN_OF_MAIN_WINDOW]. Due to API limitations, passing a direct index will return a rounded-up integer, if the screen has a fractional scale (e.g. [code]1.25[/code] would get rounded up to [code]2.0[/code]).