diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-10-01 23:03:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-01 23:03:09 +0200 |
commit | 5e726d8d2025f1bc52299894230d94ef5972cea4 (patch) | |
tree | e03d6082c6564bc2a6c39d1f61d6391f9d35fac3 /doc | |
parent | 25ca77c3796602b52ee9dca98abbb35aa9ede773 (diff) | |
parent | b0152dcac5b7e7e3112089949856019c65ce2e23 (diff) |
Merge pull request #42477 from bruvzg/macos_dpi
[4.0] Fix `screen_get_dpi` on macOS.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/DisplayServer.xml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 28194587ab..53776b7752 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -521,6 +521,18 @@ <argument index="0" name="screen" type="int" default="-1"> </argument> <description> + Returns the dots per inch density of the specified screen. If [code]screen[/code] is [/code]SCREEN_OF_MAIN_WINDOW[/code] (the default value), a screen with the main window will be used. + [b]Note:[/b] On macOS, returned value is inaccurate if fractional display scaling mode is used. + [b]Note:[/b] On Android devices, the actual screen densities are grouped into six generalized densities: + [codeblock] + ldpi - 120 dpi + mdpi - 160 dpi + hdpi - 240 dpi + xhdpi - 320 dpi + xxhdpi - 480 dpi + xxxhdpi - 640 dpi + [/codeblock] + [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. Returns [code]72[/code] on unsupported platforms. </description> </method> <method name="screen_get_max_scale" qualifiers="const"> |