How do you detect is screen is in fullscreen or windowed

Godot Version

4.2.1

Question

I have been searching for a wile how to detct if the screen is in fullscreen or in windowed but I can’t seem to find anything. Can anyone help me please.

On G3:
OS.window_fullscreen will return the state.

On G4 there seen to be another way that is not that direct.

can’t seem to find the function

For Godot 4 use:

DisplayServer.window_get_mode()

**

yeah I tried that but when I print_debug it it gives me a number

**

Yes it’s an enum, see here

1 Like