GDQuest / learn-gdscript

Learn Godot's GDScript programming language from zero, right in your browser, for free.
https://gdquest.github.io/learn-gdscript/
Other
2.09k stars 156 forks source link

Mouse cursor lags at 2560 x 1440 resolution when full-screen (Windows App) #464

Open TomSpalango opened 2 years ago

TomSpalango commented 2 years ago

The mouse cursor lags at 2560 x 1440 resolution when in full-screen mode after certain elements are activated.

When you first launch the app you are in Full-Screen mode and the mouse cursor lags throughout the entire screen. If you exit and re-enter full-screen mode, the mouse cursor will move smoothly and continue to do so until you interact with certain elements, such as items you can click on or code snippet areas. This occurs when you hover over those elements with the mouse or if you use the keyboard's arrow keys to navigate to and therefore activate those same areas. From that point on, the cursor lags unless you refresh by exiting and re-entering full-screen mode.

OS: Windows 11 GPU: RTX 3080 Mouse: Razer Deathadder Elite Monitor: Acer Predator XB271HU 27"

NathanLovato commented 2 years ago

That's a weird bug. Does this only happen with this resolution? I.e. if you change your screen resolution to 1920x1080 or 4k, you never get this lag? Or is the issue instead just when you focus an element with the keyboard and then move the mouse?

This might be a Godot bug introduced by changes in Windows 11, as we haven't seen stuff like this in older versions of Windows.

TomSpalango commented 2 years ago

Monitor A: Acer Predator XB271HU 27" - 1440p, 144Hz Monitor B: VX248H - 1080p, 60Hz

On Monitor A I tried the native resolution 2560 x 1440 and it lags as originally reported. The highest resolution that monitor has is 3620 x 2036 and it's the same result. So it appears resolution >= 2560 x 1440 == mouse lag.

Here are the situations where it works fine with no lag: -Monitor A: Anything other than full-screen mode: full size window, various size windows -Monitor B: All modes, including full-screen (1080p)

Any other ideas on how I can provide more meaningful troubleshooting information? It would be helpful if someone else can test at that same resolution to see if it is monitor-specific somehow.

Calinou commented 1 year ago

This may be due to Windows enabling exclusive fullscreen for the app because its window size is equal to the screen size.

Staying in windowed mode and toggling borderless window using Borderless Gaming may resolve the issue.

NathanLovato commented 1 year ago

Thanks for taking the time to share insights @Calinou :)