No fullscreen modes on 120Hz monitor

Monkey Targets Forums/Desktop/No fullscreen modes on 120Hz monitor

Powelly(Posted 2016) [#1]
I'm having a problem with running my game fullscreen on a PC with a 120Hz monitor.
Calling the DisplayModes() function returns an empty array.

Looking at the generated C++ code, it looks as though any fullscreen modes that run at anything other than 60Hz are filtered out:
if( vmode->refreshRate && vmode->refreshRate!=60 ) continue;

The problem is that this monitor only has 120Hz modes.

If I call SetDeviceWindow() with a known good resolution;
SetDeviceWindow(640, 480, 1)

then the display does go into fullscreen at the requested resolution at 120Hz.
My game then runs just fine.(although it only updates the display at 60fps, which is expected)

Is there anything I can do to fix this, other than hacking the generated C++ code?


skid(Posted 2016) [#2]
you can hack the module source instead of the generated C++

targets/glfw3/modules/native/glfwgame.cpp[644]