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

Fix: [OpenGL] Check maximum supported texture size against screen resolution. #9076

Merged
merged 1 commit into from Apr 21, 2021

Conversation

@michicc
Copy link
Member

@michicc michicc commented Apr 21, 2021

Motivation / Problem

The OpenGL init code assumes that a full screen texture is supported, but does not check. The assumption isn't that outlandish, as you'd have to use some high-res (> full HD) screen on really old hardware/drivers to trigger it, but better be safe.

Description / Limitations

Check max texture size against screen resolution to make sure we can always resize the window / switch to fullscreen, as we don't support runtime switching of the used video driver.

We don't know if this is in fact an issue or if this commit is fixing anything, but it shouldn't hurt. This is also ignoring multi-monitor setups or displays that are attached after OpenTTD is started.

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')
@LordAro
Copy link
Member

@LordAro LordAro commented Apr 21, 2021

Is this supposed to fix #8967 or #8969 ?

@michicc
Copy link
Member Author

@michicc michicc commented Apr 21, 2021

It is supposed to improve robustness, but is not expected to fix any of the reported bugs.

@michicc michicc merged commit e533133 into OpenTTD:master Apr 21, 2021
11 checks passed
@michicc michicc deleted the pr/gl_tex_size branch Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants