godotengine / godotengine/godot

`VSyncMode` not working like an enum

Open
#110,447 8 comments 1 reaction 0 assignees View on GitHub
documentation topic:gdscript
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Reproducible in: 4.4.1.stable

### System information

Godot v4.4.1.stable - Ubuntu 24.04.3 LTS 24.04 on Wayland - X11 display driver, Multi-window, 1 monitor - OpenGL 3 (Compatibility) - AMD Radeon 760M (radeonsi, phoenix, LLVM 20.1.2, DRM 3.57, 6.8.0-79-generic) - AMD Ryzen 5 7640U w/ Radeon 760M Graphics (12 threads)

### Issue description

According to the documentation, `DisplayServer.VSyncMode` is an enum.
So I would like to get the name of its current setting.

However, it does not recognize the enum methods `keys` and `values`.
`window_get_vsync_mode` only returns the index.

Edit: Same issue probably for all enums in `DisplayServer`.

### Steps to reproduce

```gdscript
DisplayServer.VSyncMode.keys()
```
=> Parser Error: Type "VSyncMode" in base "DisplayServer" cannot be used on its own.

### Minimal reproduction project (MRP)

N/A

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the DisplayServer.VSyncMode enum exposure and the window_get_vsync_mode API, then compare their behavior with the documentation. Check whether the same limitation affects other DisplayServer enums. Done means the documented enum access and returned values agree, with the reproduction no longer producing the parser error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.