Skip to content

Detect and correctly report all Windows x86/x64 versions in System Information#18645

Merged
LibretroAdmin merged 3 commits intolibretro:masterfrom
PoloniumRain:windows-reporting-fix
Jan 27, 2026
Merged

Detect and correctly report all Windows x86/x64 versions in System Information#18645
LibretroAdmin merged 3 commits intolibretro:masterfrom
PoloniumRain:windows-reporting-fix

Conversation

@PoloniumRain
Copy link
Copy Markdown
Contributor

This fixes the incorrect Windows OS being reported in System Information → Frontend OS.

This issue has existed for a very long time, possibly since Windows 8.1, and has been mentioned in #4768, #17712 and #13110, which are now closed. But the problem was never fixed (see latest posts here). The latest stable and nightly builds are still affected.


Windows OSes affected by this issue:

  • Windows 11 - All editions
  • Windows 10 - All editions
  • Windows 8.1 - All editions
  • Windows Server 2025, 2022, 2019, 2016, and 2012 R2


Basically, it is all Windows OSes from 8.1 onwards. The problem is partly because of the compiler/manifest.

Here's some examples of OS misreporting with the latest buildbot builds:

OS RetroArch
Windows 11 Image
Windows 10 Image
Windows 8.1 Image
Windows Server 2025 Image


Changes in this PR:

  • Correctly report all Windows OSes from 8.1 onwards. Previously, the deprecated GetVersionEx was used, so OS reporting accuracy depended on manifest compatibility entries that can vary by toolchain and compiler. Windows 8.1+ will intentionally report an older OS when the manifest does not declare support for the OS. This is why Windows 10 shows Windows 8 with buildbot/MinGW 10.2.0 above, but newer MinGW versions will work. RtlGetVersion is now used for OS detection starting from NT 5.0 (Windows 2000), which always reports the actual Windows version regardless of the manifest.
  • Report the Windows feature version when available (e.g. 25H2). This is increasingly important given the long lifespan of modern Windows versions (10/11) and how often these feature updates now break/change/add components. Future releases should also be reported correctly without requiring any changes, as the feature version is read from the Windows registry.
  • Added detection for Windows Server 2019/2022/2025.
  • Correctly report Windows XP Professional x64 Edition and Windows Server 2003/2003 R2/2008/2008 R2. These share the same NT version + build number, which was causing detection to fail.
  • Detect Windows 98 Second Edition separately from Windows 98, which is a distinct OS revision with meaningful system and driver differences.
  • Change Windows Me being reported as Windows ME to Windows Me (official documentation always uses a lower-case e. So i've been typing it wrong for 25+ years...).
  • Improve readability of the reported OS by inserting a -. For example: Windows 11 (25H2) x64 - Build 26200
  • Made fallbacks more robust and improved clarity. They will now show either: Windows NT kernel x.x or Windows 9x version x.x. Previously it would show Windows x.x, which could be mistaken for the OS name.
  • Added many code comments to help maintainability.


Accurately reporting the Windows OS involves many edge cases and historical inconsistencies, so all Windows versions listed below were tested using x86/x64 builds from many different MSVC and MinGW compiler versions (yeah it took ages!).

OS (by release date) RetroArch
Windows 11 Insider Preview
(latest Dev channel build)
win11_26H1_Dev
Now reported correctly.
Windows 11 Insider Preview
(older Dev channel build)
win11_Dev
Note: Windows Insider builds may report channel names (e.g. “Dev”), as this is
sometimes stored in the registry, instead of the feature version name.
Windows 11 (25H2) win11_25H2
Now reported correctly.
Windows Server 2025 (24H2) win_server_2025
Newly added.
Windows 11 IoT Enterprise
(24H2)
win11_IoT_Ent
An example of a more obscure Windows edition. Different editions make no
difference to OS detection accuracy.
Windows 10 (22H2) win10_22H2
Now reported correctly.
Windows Server 2022 (21H2) win_server_2022
Newly added.
Windows Server 2019 (1809) win_server_2019
Newly added.
Windows Server 2016 (1607) win_server_2016
Now reported correctly.
Windows 10 (1507)
(first released version)
win10_RTM
Note: Earlier Win10/Server releases used a different feature version format, e.g.
1507 (year/month) instead of the current year/half-year format.
Windows Server 2012 R2 win_server_2012_R2
Now reported correctly.
Windows 8.1 win8 1
Now reported correctly.
Windows 8 win8
Windows Server 2012 win_server_2012
Windows 7 win7
Windows Server 2008 R2 win_server_2008_R2
Now reported correctly.
Windows Server 2008 win_server_2008
Now reported correctly.
Windows Vista winVista
Note: Pre-Vista Oses (below) lack reliable API support for x86/x64 detection.
Windows Server 2003 R2 win_server_2003_R2
Now reported correctly.
Windows XP x64 winXP_x64
Now reported correctly. Note: XP x64 only had a single edition released, making
it safe/easy to use the full product name here.
Windows Server 2003 win_server_2003
Now reported correctly.
Windows XP winXP
Windows Me winMe
Now displays Me instead of ME.
Windows 2000 win2k
Windows 98 Second Edition win98SE
Newly added.
Windows 98 win98
Windows 95 and NT 4.0 Were not tested. RA hasn't worked on these OSes for a long time, but they
should be reported correctly if builds were made to work on them.

@PoloniumRain
Copy link
Copy Markdown
Contributor Author

Ah i forgot to add a fallback for Windows 10/11. It's finalised now.

@zoltanvb
Copy link
Copy Markdown
Contributor

This is some next level dedication 🥇

@LibretroAdmin LibretroAdmin merged commit 8262e26 into libretro:master Jan 27, 2026
34 checks passed
@LibretroAdmin
Copy link
Copy Markdown
Contributor

Hi, I hate to have to revert this, but this breaks the MSVC 2005/2010 builds right now, and it's imperative that RetroArch builds right now as we are leading up to a major release.

Here are the build errors
(MSVC 05 x86)
https://git.libretro.com/libretro/RetroArch/-/jobs/855772
(MSV 10 x86)
https://git.libretro.com/libretro/RetroArch/-/jobs/855771
(MSVC 10 x64)
https://git.libretro.com/libretro/RetroArch/-/jobs/855770

While I have to revert this PR for now, I'd be excited to receive a new PR with these issues fixed. If you can provide that, then that new PR can be merged.
Thanks

@PoloniumRain
Copy link
Copy Markdown
Contributor Author

@LibretroAdmin No worries. But that's strange... Those were already tested and did not produce build errors, but maybe i've used different settings or something. I'll look in to it and try to get a fix submitted soon!

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.

3 participants