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
gui_zoom can have invalid values, not respecting zoom_min #8711
Comments
Can you try downloading OpenTTD 1.10.3 from the official OpenTTD website and starting it up? |
Found the culprit: I enabled auto-detect interface size on the game options when trying it on master, setting it to normal it started to work again on 1.10.3 |
Invalid settings should be clamped to the valid range, which as far as I can see had no changes for 1.11. Clamping in case of the interface size means in this case it will use maximum zoom-in. Can you check how 1.10.3 behaves for you if you manually select maximum zoom? |
I can only select between normal and double size in 1.10.3 and runs fine with both settings, quad size is disabled in both 1.10.3 and master. |
If quad size is disabled, As far as I can see, the GUI zoom from the config file is not validated against the zoom_min/zoom_max settings. This is not directly related to the zoom auto-detect, except that old OTTD versions interpret it as maximum zoom-in. Fortunately, the amount of people who a) have limited the game zoom, b) upgrade to 1.11 while keeping older versions around, and c) switch to auto-detect zoom even though their config files must contain perfectly workable GUI zooms is probably very, very small. |
In master, setting I assume it is the same problem hitting 1.10.3. But as I cannot see the backtrace etc, that is a bit hard to confirm for me. Anyway, it indeed has nothing really to do with the auto-detect, as previously stated. I am going to update this ticket to reflect the master issue, as we can fix that. That doesn't fix the issue for 1.10, but I think at this point in time that is not realistic to do either (as it would require a 1.10.4, I think). |
gui_zoom was never clamp'd between zoom_min/zoom_max. zoom_min controls how zoomed-in we load sprites. For a value of 1, no quad-sizes sprites are loaded. If gui_zoom would be 0, meaning it wants quad-sized sprites to display, it was printing random stuff to the screen, which could or could not result in crashes.
gui_zoom was never clamp'd between zoom_min/zoom_max. zoom_min controls how zoomed-in we load sprites. For a value of 1, no quad-sizes sprites are loaded. If gui_zoom would be 0, meaning it wants quad-sized sprites to display, it was printing random stuff to the screen, which could or could not result in crashes.
Version of OpenTTD
1.10.3 - microsoft store version
master
Expected result
1.10.3 - Not crashing at start
master - clamp the interface size to a valid value
Actual result
1.10.3 - Crashing at start
master - graphics fail to load properly, looking really odd; it can also crash. Depends a bit.
crash.zip
Steps to reproduce
1.10.3
master
gui_zoom
to 0 andzoom_min
to 1The text was updated successfully, but these errors were encountered: