Fullscreen Resolution Question
Fri, 2019-10-11 03:27
I have my desktop display resolution at 1600 x 900. I set the game to the same. But, for some reason, whenever I launch the game it actually tries to run at 1680 x 1050. (Or so my TV says when it switches over and the game has black bars above and below it.)
Game does not do this and plays properly in window mode.
Am I missing some setting?
I am currently running game on windows 10, for the moment. Is there a setting in windows I need to change to stop this from happening. Can not find setting in game to achieve this.
I want to resolve this because I don't think it's best for my TV to keep switching resolutions every time I switch between the Hedgewars menu and engine. If the resolutions were the same; no switch should happen.
If you are starting in fullscreen, use the Fullscreen Resolution in game settings on the Graphics tab.
If you are triggering fullscreen in game, it uses the same resolution you used for the window.
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
Tried both ways and it still wants to do 1680 x 1050.
So, maybe a little background.
My TV is 4K but my graphic card is an integrated AMD and not that powerful. So, to try to squeeze more out of it I set my desktop resolution and resolution within games to 1600 x 900.
Hedgewars is set to fullscreen for both the game engine and for the front end. The front end looks just fine. I set 1600 x 900 as the resolution.
The windows 10 settings
'Display Resolution 1600 x 900'
'Change the size of text, apps, and other items 100%'
'Display Orientation Landscape'
In theory, like my other games, it should launch into fullscreen at 1600 x 900 without causing my TV to switch resolutions.
Yet, it chooses to launch with black bars at the top and bottom at what my TV says is 1680 x 1050 and when it returns it returns back to 3840 x 2160(so my TV says;) to spite my windows 10 display settings still being at 1600 x 900.
My best guess is that maybe the game is trying to launch at 1600 x 900 but either windows 10 or the TV doesn't think it's fitting or something and is trying to 'scale' it to a resolution it thinks is more appropriate.
It's odd, though, because none of my other games do this. If I do window mode at 1600 x 900 it launches about a centimeter too high but otherwise fine. But, it does not want to go fullscreen at that resolution.
What are the values on the Graphics tab?
And would you mind sharing your config file, MINUS the hashed password if you set hedgewars to "remember" your password?
As to what Hedgewars is doing, it's nothing too special, it's just an SDL app requesting a window of particular dimensions. And since it's open source, you can review the code yourself .
https://hg.hedgewars.org/hedgewars/file/tip/hedgewars/uStore.pas#l1205 This is chFullScr which does window creation/recreation.
https://hg.hedgewars.org/hedgewars/file/tip/hedgewars/uStore.pas#l1297 Initial window creation which is passed cScreenWidth/cScreenHeight
Just below that you can see the fullscreen toggling.
The values for fullscreen and windowed are passed into the engine as parameters. You can in fact launch the engine on its own, say as:
hwengine somedemo.hwd if you want to test these. Those parameters are set here:
https://hg.hedgewars.org/hedgewars/file/tip/hedgewars/ArgParsers.pas#l266 --fullscreen-width --fullscreen-height --width --height
These 4 values are passed in to hwengine from the frontend here:
https://hg.hedgewars.org/hedgewars/file/tip/QTfrontend/game.cpp#l615 where they are read from your configuration setup.
Whiiiich is here: https://hg.hedgewars.org/hedgewars/file/tip/QTfrontend/gameuiconfig.cpp#l365
And that's pretty much tracing it back to the config screen.
So. Either the values on that config screen are bad, or the SDL window configuration is rejecting the value due to something about your setup, in which case perhaps filing a bug with the SDL2 team is in order. https://wiki.libsdl.org/SDL_CreateWindow
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
[frontend]
firstLaunch=false
effects=true
fullscreen=true
sound=true
music=true
lastroomname=Bloop 2
[video]
fullscreenResolution=1600x900
windowedWidth=1600
windowedHeight=880
windowedMaximized=true
fullscreen=true
quality=5
zoom=100
stereo=0
[misc]
weaponTooltips=true
altdamage=true
teamtag=true
hogtag=true
healthtag=true
tagopacity=false
appendTimeToRecords=false
locale=
quickGameExperience=20
[audio]
sound=true
music=true
volume=100
dampen=true
[net]
nick=Evil Ed
passwordhash=
passwordlength=8
savepassword=true
ip=
port=46631
servername=Hedgewars Server
serverport=46631
[fps]
show=false
limit=31
[proxy]
type=0
[colors]
color8=#ffff01
color7=#8f5902
color6=#fe8b0e
color5=#20bf00
color4=#e55bb0
color3=#b541ef
color2=#1de6ba
color1=#4980c1
color0=#ff0204
[videorec]
format=mp4
videocodec=libx264
audiocodec=mp2
framerate=30
bitrate=1000
width=1600
height=900
usegameres=true
audio=true
So. I'm going to guess based on fact that *your* settings are correct, that the issue is with SDL.
SDL maybe be determining that your TV cannot actually support 1600x900. This could be an issue with your OS/windowing environment misreporting supported resolutions, or SDL just not getting the values properly.
I know we used to have issues with SDL getting inaccurate lists from X. At one point we used to fullscreen to the closest reported resolution from the SDL display resolutions query that we used to populate the frontend. but since it wasn't super accurate we tossed all that and just attempted to create window at the requested user dimensions. Usually that works...
To figure out what's going on here, I guess we could start by seeing if there's a way to find out in your windowing system what the supported resolutions are, and in the SDL code to see how it is getting that information.
Unfortunately I know basically nothing about Windows 10 or Microsoft's environmen in general. Perhaps you could begin by filing a bug report with the SDL team?
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
Oh, and one more thing. Maybe you could try starting in windowed mode, and resizing to different sizes then hitting F12 - just to see what the result is - does it use the window resolution or does it still force to 1600x1050 as if that's the only allowed size.
Also... You could also just play in windowed mode, maximised, on that display? personally I find that easier to do because I can switch to the lobby if I'm running the room. Also as a plain Windows 10 window, it might be better behaved with that display.
Let's see if alfadur can drop by here with some insights. He uses MS Windows .
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev