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

Codechange: [Win32] Window driver cleanup #8586

Merged
merged 5 commits into from Jan 17, 2021

Conversation

michicc
Copy link
Member

@michicc michicc commented Jan 17, 2021

Motivation / Problem / Description

The different video drivers do similar things differently.

Make the Win32 driver more similar to the other drivers. While at it, fix some things like outdated comments or unneeded work-arounds for Windows 95.

This is not supposed to change any functionality.

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')

michicc and others added 5 commits January 17, 2021 00:32
Functional it is identical. Just helps future-us when searching
for sleeps.
Other drivers do this too, and this makes the world a bit more
the same.
Sometimes it returned an usererror(), sometimes Start() failed.
Now it always fails on Start(), so nothing else has to check again
what blitter is used.

AfterBlitterChange() can never change to a 0bpp, so it is sufficient
to guard this with an assert().
Copy link
Member

@LordAro LordAro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks fine. I assume you've actually tested it :)

@michicc michicc merged commit 1eceee9 into OpenTTD:master Jan 17, 2021
@michicc michicc deleted the pr/vid_cleanup branch January 17, 2021 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants