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

Remove remaining Windows 95 support #8720

merged 3 commits into from Feb 23, 2021


Copy link

@nielsmh nielsmh commented Feb 21, 2021

Motivation / Problem

By attempting to support compiling both with and without UNICODE defined, it makes the code more complex to read and write. There probably aren't any compilers available that target Windows 95/98/ME and also support the languages features we want any more regardless, so may as well clean it up.


More or less a search first for uses of the UNICODE define, and simplify the code there.
Then various other simplifications by cleaning up code that only supports special cases/downlevel OS.
Finally some cleanup by more searching for terms like _T(, TCHAR, and _tcs and replacing them with plain wchar_t code.


Definitely no longer builds a binary that works on 25 year old Windows systems.

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')
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')
Copy link

@glx22 glx22 left a comment

I'm surprised it compiled

src/os/windows/crashlog_win.cpp Outdated Show resolved Hide resolved
src/os/windows/font_win32.cpp Outdated Show resolved Hide resolved
@nielsmh nielsmh force-pushed the always-unicode branch from bcedad9 to a6e7fa4 Feb 21, 2021
src/os/windows/win32.h Outdated Show resolved Hide resolved
src/os/windows/win32.cpp Outdated Show resolved Hide resolved
@nielsmh nielsmh force-pushed the always-unicode branch 2 times, most recently from eb2cc2d to 070f1ad Feb 22, 2021
@nielsmh nielsmh force-pushed the always-unicode branch from 070f1ad to e00e781 Feb 22, 2021
@nielsmh nielsmh merged commit cc465ef into OpenTTD:master Feb 23, 2021
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants