STK release version: git System: Arch - AMDGPU
It switches me to 30hz upon opening the game and then switches me back to 60hz when I exit.
I use xrandr --newmode "mymode" 594 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync
every time I boot the system to add the mode, as there is some problem with my drivers or display, 0 A.D. has no problems with this, but SuperTuxKart does. I only recently got a HDMI 2.1 cable, otherwise I would have tested this earlier
Could you show the output of "xrandr" command? If these two modes 30hz and 60hz have equal resolution, it should choose the one with higher refresh rate, because we already check it.
Actually you can try this patch:
diff --git a/lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp b/lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp
index 04e5d2d3c..17b26d0d1 100644
--- a/lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp
+++ b/lib/irrlicht/source/Irrlicht/CIrrDeviceLinux.cpp
@@ -453,7 +453,7 @@ bool CIrrDeviceLinux::changeResolution()
refresh_rate_new = (mode->dotClock * 1000.0) / (mode->hTotal * mode->vTotal);
if (refresh_rate_new <= refresh_rate)
- break;
+ continue;
for (int j = 0; j < output->nmode; j++)
{
Because if you have the same resolution in two different modes, maybe it breaks early and it doesn't check the second one.
I made a commit anyway, because it's more correct. You can see if it helped.
Most helpful comment
I made a commit anyway, because it's more correct. You can see if it helped.