Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Wrong screen resolution when trying to go to fullscreen #4489

Closed
DorpsGek opened this issue Feb 9, 2011 · 5 comments
Closed

[Windows] Wrong screen resolution when trying to go to fullscreen #4489

DorpsGek opened this issue Feb 9, 2011 · 5 comments
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Feb 9, 2011

perk11 opened the ticket and wrote:

I tested this on Linux and it works fine, so I propose it' s Windows-only bug.

  1. Run the game on Windows. Make sure you're not in fullscreen mode.
  2. Maximize window or randomly change its size, unless it's already maximized.
  3. Quit game. Now in openttd.cfg you'll find that "resolution" parameter is set to the last window size.'
  4. Run the game again.
  5. Go to Game options. Do not change anything in "Screen resolution" section. The value there should be "custom".
  6. Click on "Fullscreen" field
    The game will now print a error message that states it can't go to fullscreen mode.
    Why this happens? I didn't look in the code, but it seems to me that the game is losely trying to go to the fullscreen mode using resolution which was set in openttd.cfg but itself to window size, which i actually unavailable.
    If you change "Screen resolution section" in settings to something other than "custom" before trying to go to fullscreen, it will go fullscreen fine too.
    And on Linux, even when screen resolution is set to "custom", the game is trying to go fullscreen with the right one.

Reported version: trunk
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/4489
@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 9, 2011

perk11 wrote:

So I think that when resolution is set to custom and trying to go to fullscreen mode the game shouldn't use that custom value, but rather use something from the listt, possibly the largest one.
But of course when fullscreen = true in openttd.cfg the game should use the resolution which is stated in the config, whatever it is


This comment was imported from FlySpray: https://bugs.openttd.org/task/4489#comment9636

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 9, 2011

perk11 wrote:

There is a typo: set in openttd.cfg but itself to window size=set in openttd.cfg by itself to window size


This comment was imported from FlySpray: https://bugs.openttd.org/task/4489#comment9637

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 9, 2011

chillcore wrote:

So I think that when resolution is set to custom and trying to go to fullscreen mode the game shouldn't use that custom value, but rather use something from the listt, possibly the largest one.

Not the biggest possible resolution should be used in case of a custom setting but the smallest supported on all monitors, that being 640 * 480. User can change this once he is in fullscreen mode.
Yes, I do have an older Win98 pc that I still use from time to time and the monitor connected to it does not support resolutions higher then 800 * 600. I'd be very sad if it was broken due to a program behaving as you discribed wether it is OpenTTD or not.

But of course when fullscreen = true in openttd.cfg the game should use the resolution which is stated in the config, whatever it is

Fullscreen should never ever use the custom resolution -> Very bad for the monitor and can cause permanent damage.

Linux seems to behave better in this case, I'd have to check but I do not think that it uses the custom setting neither, instead it picks the desktop resolution IIRC. (Long time ago I did some testing -> I will not test anymore because I do not want to break my monitor; at the time it was possible to choose unsupported resolutions causing scrambled fullscreen mode).

If Windows is not smart enough to pick the desktop resolution, or OpenTTD is not able to read the desktop resolution, in case of a custom setting then the error message is correct behaviour and should not be changed, IMHO.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4489#comment9638

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 9, 2011

perk11 wrote:

Well, actually all the resolutions which are listed in the settings are supported by my monitor (not sure that it's always so), that's why I proposed it's to be the last one.
About the custom resolution - all the modern monitors are protected from the damaging use of wrong, damaging resolution, especially LCD monitors.
Of course, there s a way for OpenTTD to read desktop resolution, cause other apps do it as well. I agree that desktop resolution is a better choice, than the last one from the list.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4489#comment9639

@DorpsGek
Copy link
Member Author

glx closed the ticket.

Reason for closing: Fixed

In r22081.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4489

@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) bug labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant