is OS.get_screen_size() = get the native screen resolution ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ruruarchy

as the question.

is OS.get_screen_size() = get the native screen resolution ?

like if it was 1920x1080 monitor it’ll be 1920x1080
elif 3840x2160 monitor it’ll be 3840x2160
and so on ?

because i don’t have any other monitor beside this laptop 1366x768
i can’t test it yet

-godot 3.1.1-

:bust_in_silhouette: Reply From: Thewolfs

Yes, it will. OS_get_window_size() on the other hand returns the size of your window (so it will change depending on if you are in fullscreen mode or window mode and which size the actual window is

But be aware that this value changes depending is HighDPI is active or not. For example with my Mac screen without HighDPI it returns 1680x1050 but with HighDPI on it returns 3360x2100
(I would recommend you activate it, you would avoid the headache of having low-quality graphics on those types of monitors)

alright, thanks for clarifying it :slight_smile:

ruruarchy | 2019-06-21 09:18

:bust_in_silhouette: Reply From: luislodosm
Vector2 get_screen_size(screen: int = -1) const

Returns the dimensions in pixels of the specified screen. If screen is [/code]-1[/code] (the default value), the current screen will be used.

In an iMac 5K it returns the native resolution: (5120, 2880) also with allow_hidpi disabled in project settings.