how to make godot use system screen resolution when start?

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

i create a small write app useing godot, but i don’t know how to use system Resolution when it runs.

just like Godot runs, it use system Resolution automaticly.

any one can help?

thanks!

:bust_in_silhouette: Reply From: njamster

Godot simply starts maximized:

OS.set_window_maximized(true)

If you’re just interested in the screen-size, you can get it with:

OS.get_screen_size()

it worked!
thanks!

huahuapro | 2020-03-22 11:30

but when i packed the game and run, the reslution is still low.

huahuapro | 2020-03-22 11:37

Which stretch mode did you configure in the Project Settings? If you set your project to use the viewport stretch mode, this is expected. Use the 2d stretch mode instead.

Calinou | 2020-03-24 09:07