0 votes

as the question.

is OS.getscreensize() = 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-

in Engine by (69 points)
edited by

2 Answers

0 votes
Best answer

Yes, it will. OSgetwindow_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)

by (81 points)
selected by

alright, thanks for clarifying it :)

0 votes
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.

by (211 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.