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

Under WinXP OpenTTD fails to sort savegames by date #7731

Closed
sirkoz opened this issue Sep 8, 2019 · 6 comments

Comments

@sirkoz
Copy link

commented Sep 8, 2019

Version of OpenTTD

1.9.2 (release)

Expected result

when clicking "Load Game" or "Save Game" one would expect the newest save to come on top if sorting by date and descending ( ˇ ) is chosen

Actual result

no matter what, the game always sorts savegames by name either ascending or descending - that function works

Steps to reproduce

run a _zip SP3 version - I use this one - of openttd under WinXP and try to load the latest savegame - you won't be able to because the game will sort them by name

@nielsmh

This comment has been minimized.

Copy link
Contributor

commented Sep 8, 2019

The sorting retrieves the file modifications via a stat call to the standard library. If that returns invalid data there isn't much we can do. We're basically at the mercy of the C standard library provided by Microsoft, and Microsoft does the bare minimum for Windows XP support. At least I'm against adding code paths specific to work around issues with XP.

@sirkoz

This comment has been minimized.

Copy link
Author

commented Sep 10, 2019

So... let me get this straight: by name sorting worked fine in openttd 1.8x and below and now one of you geniuses did something that broke the sorting. Am I correct? Or will you try to again blame microsoft for your mistakes?
If you offer OpenTTD for all operating systems, it should work on all, no? Yes?
Please, just fix it and be done with it.

@Eddi-z

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2019

We are modernizing the OpenTTD codebase step by step, and in this process we will be dropping some older OSes.

E.g. we are not providing compiled versions for WinXP anymore, because our new compile environment does not support it, and we will most likely not be fixing WinXP-specific bugs as we have no means of testing them.

Please just update your OS and be done with it.

@andythenorth

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2019

I am closing this issue as it's unhelpful.

Noting though that we do need to clarify the supported OS policy. It's confusing.

Policy 1: https://www.openttd.org/about.html
Policy 2: https://github.com/OpenTTD/OpenTTD/#30-supported-platforms
Policy 3: https://wiki.openttd.org/Operating_system

When I have tried to establish what the policy should be (and update docs accordingly), I naturally get conflicting answers depending who is in #openttd that day, because that's the nature of the project 😃 It does need an answer though, so that docs can be updated.

@j-pet

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2019

According to this document: Windows C++ Function _wstat does not work correctly within Windows XP or Windows 2003 this bug was fixed in MSVS 2017 version 15.5.

@nielsmh

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2019

The above ticket with MS mentions that the version of _wstat that functions fully on Windows XP requires the v141_xp toolset for building, that's Visual C++ 2017. There is no v142_xp toolset in existence, the one for Visual C++ 2019, and while we aren't using the 2019 toolset for building OpenTTD yet, we will probably move to it sooner or later.

If anyone wants to work around this feel free to make a PR, but I don't think anything that changes the toolset to v141_xp will get merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.