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

Fix reported version of newer Windows 10 releases #55506

Merged
merged 2 commits into from
Feb 21, 2022

Conversation

xuvatilavv
Copy link
Contributor

Summary

Bugfixes "Fix reported version of newer Windows 10 releases"

Purpose of change

Partial fix for #55454 (this does not address Windows 11 issues)

The Windows registry value containing the release version has changed. I can find no official announcement or documentation, but as best as I can tell 20H2 (aka 2009) introduced the value DisplayName and was the last version the old ReleaseId value was updated.

In subsequent Windows versions the older value has been left as "2009" and not removed, so many bug reports here with that version number are likely inaccurate. There are a few dozen that report 20H2 and 21H1; at a glance these seem to all come from the RtlGetVersion fallback since they also include the Windows build number.

Describe the solution

This PR makes it so we check for DisplayName first, falling back to ReleaseId for older versions.

Describe alternatives you've considered

  • Exclusively use RtlGetVersion: Existing code suggests multiple compilers don't support that function.
  • Use this change but try RtlGetVersion first: I'm not qualified to make that decision.

Testing

I generated a game report on my own computer running Windows 10 21H2, and the reported version is now correct.

Additional context

Without official documentation I don't know if this new value is intended to be used or will reliably continue, but there are many other projects using a similar solution. Here are a few examples:
NVDA
Lansweeper
detect-windows-version

I also came across this thread, which suggests that all of the values we're currently using are left with "legacy" (aka "wrong") values in Windows 11, so version reporting there will also be inaccurate. I don't have any devices that can run it so I can't investigate that myself.

@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Feb 19, 2022
@Maleclypse Maleclypse added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` labels Feb 20, 2022
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Feb 20, 2022
@ZhilkinSerg ZhilkinSerg merged commit b6a616b into CleverRaven:master Feb 21, 2022
scarf005 added a commit to scarf005/Cataclysm-BN that referenced this pull request Aug 30, 2023
scarf005 added a commit to scarf005/Cataclysm-BN that referenced this pull request Aug 31, 2023
scarf005 added a commit to scarf005/Cataclysm-BN that referenced this pull request Sep 1, 2023
Firestorm01X2 pushed a commit to cataclysmbnteam/Cataclysm-BN that referenced this pull request Sep 3, 2023
* chore: unindent common messages

was very confusing with `CMAKE_BUILD_TYPE`

* fix(port): BSD macro in src/debug.cpp

from: CleverRaven/Cataclysm-DDA#47440

Co-authored-by: Brett Dong <[email protected]>

* fix(port): Implement C++ symbol demangling on macOS

from: CleverRaven/Cataclysm-DDA#47486

Co-authored-by: Brett Dong <[email protected]>

* refactor(port):  Extract symbol demangling to a separate function

from: CleverRaven/Cataclysm-DDA#47517

Co-authored-by: Brett Dong <[email protected]>

* feat(port):  Demangle symbol names on MinGW

from: CleverRaven/Cataclysm-DDA#47517

Co-authored-by: Brett Dong <[email protected]>

* feat(port):  Implement C++ symbol demangling on Linux

from: CleverRaven/Cataclysm-DDA#47621

Co-authored-by: Brett Dong <[email protected]>

* feat(port):  Implement C++ symbol demangling on FreeBSD and OpenBSD

from: CleverRaven/Cataclysm-DDA#48152

Co-authored-by: Brett Dong <[email protected]>

* fix(port):  C++ symbol demangling on cross-compile MinGW

from: CleverRaven/Cataclysm-DDA#48220

Co-authored-by: Brett Dong <[email protected]>

* fix(port): memory leak in demangle()

from: CleverRaven/Cataclysm-DDA#48230

Co-authored-by: Brett Dong <[email protected]>

* feat(port):
Backtrace on Android

from: CleverRaven/Cataclysm-DDA#48371

Co-authored-by: Brett Dong <[email protected]>

* chore(port): hide write_demangled_frame() for Android build

from: CleverRaven/Cataclysm-DDA#48414

Co-authored-by: Brett Dong <[email protected]>

* feat(port):
demangle RTTI type names in debug messages

from: CleverRaven/Cataclysm-DDA#52633

Co-authored-by: Brett Dong <[email protected]>

* perf(port): optimize null stream in DebugLog

from: CleverRaven/Cataclysm-DDA#55156

Co-authored-by: Brett Dong <[email protected]>

* fix(port): reported version of newer Windows 10 releases

from: CleverRaven/Cataclysm-DDA#55506

Co-authored-by: xuv <[email protected]>

* feat(port): include build number in windows version report

CleverRaven/Cataclysm-DDA#55646

Co-authored-by: xuv <[email protected]>

* feat(port): get the actual static image base of modules

from: CleverRaven/Cataclysm-DDA#55782

Co-authored-by: Qrox <[email protected]>

* ci: fix version typo

* feat(port): support libbacktrace on linux

from: CleverRaven/Cataclysm-DDA#59020

Co-authored-by: John Bytheway <[email protected]>

* build(cmake): support custom linker

context:
https://stackoverflow.com//questions/1867745/cmake-use-a-custom-linker#answer-66730019

* docs(cmake): linker, backtrace and libbacktrace

---------

Co-authored-by: Brett Dong <[email protected]>
Co-authored-by: xuv <[email protected]>
Co-authored-by: Qrox <[email protected]>
Co-authored-by: John Bytheway <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants