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

Choose a reason for hiding this comment

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

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
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 Compare February 22, 2021 21:32
@nielsmh nielsmh merged commit cc465ef into OpenTTD:master Feb 23, 2021
@nielsmh nielsmh deleted the always-unicode branch May 7, 2022 08:22
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

4 participants