Resize the application window depending on the monitor resolution

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

Hi,
I’m creating an application in godot. I need to resize the application window depending on the monitor resolution. For example monitor resolution is 1920x1080, application window size is 1280x760. If the application would run on a monitor with a resolution of 3840x2160, the application window size would be 2560x1520. If there is no way to set this in godot, do you know any code? Thanks

:bust_in_silhouette: Reply From: ANARCK3L

OS.set_window_size(OS.get_screen_size() / 1.5)
this should work

It works, but texture quality is pretty bad. There are my options. Is everything right?

1 hosted at ImgBB — ImgBB
2 hosted at ImgBB — ImgBB

Babako | 2022-10-20 11:20

:bust_in_silhouette: Reply From: theMX89

go to project settings, display, and tick fullscreen on. set the viewport to 2d in the same settings window

:bust_in_silhouette: Reply From: Babako

It works, but texture quality is pretty bad. There are my options. Is everything right?