summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2026-08-05 19:09:19 +0200
committerThaddeus Crews <repiteo@outlook.com>2026-08-12 11:26:26 -0500
commitbfc193be261507e4f72d83b5346e147cbb2aa0ff (patch)
tree83b51bc6bf6e71d556072206d2a765c95ab330bf
parent072e546a179be11bfebfee1d8e719db0cf3d5dda (diff)
Fix incorrect note about `DisplayServer.screen_get_max_scale()` only working on macOS
(cherry picked from commit 9b012119154d72489305f7c460b13fd6e9f4fbdc)
-rw-r--r--doc/classes/DisplayServer.xml7
1 files 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 @@
<method name="screen_get_max_scale" qualifiers="const">
<return type="float" />
<description>
- 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.
</description>
</method>
<method name="screen_get_orientation" qualifiers="const">
@@ -1844,7 +1843,7 @@
<return type="float" />
<param index="0" name="screen" type="int" default="-1" />
<description>
- 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]).