Unable to change resolution

Unable to change resolution

Postby Mapsking » 25 May 2022, 04:29

Hello, we went to play STK tonight, and I noticed I had black bars on the sides of my game. I am running Windows 10 x64, on a single monitor, at 3840x2160 resolution. I verified Windows is showing the correct resolution, but every time I load STK, and try to change it, it automatically changes it to 1600x1024, as shown here. I have no idea why, but I tried changing it to various other resolutions. Are there any solutions or suggestions?

Image

EDIT: The image below is somehow cut off in the forum, so here is the direct link. https://i.imgur.com/YI3eauN.png
Mapsking
 
Posts: 16
Joined: 23 Mar 2011, 07:14

Re: Unable to change resolution

Postby benau » 25 May 2022, 07:00

Image
benau
STK Moderator
 
Posts: 505
Joined: 08 Dec 2015, 17:32

Re: Unable to change resolution

Postby Mapsking » 25 May 2022, 21:45

I’m not sure what that means. Do I need to recompile the source code or something? The screenshots indicate Gnome, and I am on Windows 10. What exactly do I need to do? I’m a bit confused.
Mapsking
 
Posts: 16
Joined: 23 Mar 2011, 07:14

Re: Unable to change resolution

Postby bzt » 25 May 2022, 22:14

Mapsking {l Wrote}:I’m not sure what that means. Do I need to recompile the source code or something?
Yes.
Mapsking {l Wrote}:The screenshots indicate Gnome, and I am on Windows 10.
Doesn't matter. The game's window is handled by SDL, which is the same in both case.
Mapsking {l Wrote}:What exactly do I need to do? I’m a bit confused.
1. Download STK source.
2. open stk-code/lib/irrlicht/source/Irrlicht/CIrrDeviceSDL.cpp in Notepad
3. at line 385, replace SDL_WINDOW_FULLSCREEN with SDL_WINDOW_FULLSCREEN_DESKTOP
4. save your modification
5. compile STK, run "cmake ." and "make" (IDK, haven't done this myself on Win, maybe you'll need mingw?)

I'd like to point out that this patch won't work entirely as expected. SDL_WINDOW_FULLSCREEN_DESKTOP does switch to fullscreen yes, but it will disregard your requested resolution (it will always use the desktop's resolution, no matter what. It isn't really true fullscreen, it is rather a decoration-less maximized window, which looks like fullscreen.)

Cheers,
bzt
User avatar
bzt
 
Posts: 332
Joined: 23 May 2021, 21:46

Re: Unable to change resolution

Postby benau » 26 May 2022, 09:41

Use the render resolution spinner for now until better scaling method is done

https://github.com/supertuxkart/stk-code/issues/4776

https://github.com/supertuxkart/stk-code/issues/4777
Image
benau
STK Moderator
 
Posts: 505
Joined: 08 Dec 2015, 17:32

Re: Unable to change resolution

Postby BryanFRitt » 23 Oct 2022, 06:05

For others who may come across this issue.
Could it be a display scaling issue?
Trying checking this box...
Right click on icon > Properties > Compatibility > Change high DPI settings > High DPI scaling override, [ ] Override high DPI scaling behavior. Scaling performed by: Application
See also:
right click on empty desktop area > Display Settings > Scale and layout > Change the size of text, apps, and other items
BryanFRitt
 
Posts: 1
Joined: 23 Oct 2022, 05:53

Who is online

Users browsing this forum: No registered users and 1 guest