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
merged 3 commits into from Feb 23, 2021
Merged

Conversation

@nielsmh
Copy link
Contributor

@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.

Description

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.

Limitations

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
Contributor

@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 nielsmh: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 nielsmh:always-unicode branch 2 times, most recently from eb2cc2d to 070f1ad Feb 22, 2021
@nielsmh nielsmh force-pushed the nielsmh:always-unicode branch from 070f1ad to e00e781 Feb 22, 2021
@nielsmh nielsmh merged commit cc465ef into OpenTTD:master Feb 23, 2021
11 checks passed
11 checks passed
Emscripten
Details
Commit checker
Details
Check preview needs update Check preview needs update
Details
Linux (clang, clang++, libsdl2-dev)
Details
Linux (gcc, g++, libsdl2-dev)
Details
Linux (gcc, g++, libsdl1.2-dev)
Details
Mac OS (x64, x86_64)
Details
Windows (windows-latest, x86)
Details
Windows (windows-latest, x64)
Details
Windows (windows-2016, x86) Windows (windows-2016, x86)
Details
Windows (windows-2016, x64) Windows (windows-2016, x64)
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants