So when I set fullscreen to be true in the config file, I get different behavior depending on which computer I use.
Game’s resolution is 1024x768, smaller than the native resolution of each of the laptop’s screens.
On one computer, the game is small (at the game’s res) and surrounded by a black border. On the other computer, the game is stretched to fill the screen.
Is there any way to control, or at least detect, this behavior?
No, not that I know of. These settings are controlled by the BIOS settings in the laptop. As far as Windows is concerned, you are opening a fullscreen image in either case.
Best solution is to give the user the choice of different fullscreen sizes, so he/she can pick the one that matches his/her actual native resolution.
This puts you in full screen, sets the screen postion and screen size. It sets the postion base on the clients screen size, and even size for full screen.
So I guess I’d like to propose my higher level problem. I would like to force a 4:3 ratio and be in fullscreen. I don’t want any stretching to occur, so I would like the game window to be surrounded by black. So ideally, there would be a 1024x768 window surrounded by blackness.
I got some effects like this by scaling the default display regions and adding black bar display regions, but it doesn’t give me the desired resolution using this approach (and I can see why, I had the entire screen’s resolution set to 1024x768 and a lot of those pixels get chopped by the black bars, I just don’t know how to fix it), and it only worked on screens which stretched the game. On screens which have the surrounded-by-blackness behavior by default, this techcnique just squishes it further.
Any suggestions for possibly an alternative approach?
I’m not sure then… I tried some and I couldnt get the same results, I did if the image was smaller then the screen size, it would have a black background like that, but i’m gussing you tried changing the images’ size too? Other then that idk.
On most windows laptops I have used, there is an option in the settings of what to do with a fullscreen image. So it’s really out of your control whether the image is stretched or black-bordered. One option I can see to control this, would be to make a fullscreen in a resolution that matches the native resolution, and then use render to texture to have your own resolution how you like it (stretched or with black).
As a laptop user, I do not mind stretching (after playing many things stretched, your eyes kind of adjust and it looks normal), and would prefer if you gave me good resolution options and just let me deal with whether I want it stretched or not.