mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
windows: prefer os version from registry
this value is not modified by compatibility mode drop reporting service pack numbers. no longer used
This commit is contained in:
parent
10fd768898
commit
dff7f20f9d
7 changed files with 102 additions and 45 deletions
|
@ -12,7 +12,8 @@
|
|||
#include <fmt/format.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include <Windows.h>
|
||||
#include "Common/WindowsRegistry.h"
|
||||
#elif defined(__APPLE__)
|
||||
#include <objc/message.h>
|
||||
#elif defined(ANDROID)
|
||||
|
@ -265,21 +266,10 @@ void DolphinAnalytics::MakeBaseBuilder()
|
|||
#if defined(_WIN32)
|
||||
builder.AddData("os-type", "windows");
|
||||
|
||||
// Windows 8 removes support for GetVersionEx and such. Stupid.
|
||||
DWORD(WINAPI * RtlGetVersion)(LPOSVERSIONINFOEXW);
|
||||
*(FARPROC*)&RtlGetVersion = GetProcAddress(GetModuleHandle(TEXT("ntdll")), "RtlGetVersion");
|
||||
|
||||
OSVERSIONINFOEXW winver;
|
||||
winver.dwOSVersionInfoSize = sizeof(winver);
|
||||
if (RtlGetVersion != nullptr)
|
||||
{
|
||||
RtlGetVersion(&winver);
|
||||
builder.AddData("win-ver-major", static_cast<u32>(winver.dwMajorVersion));
|
||||
builder.AddData("win-ver-minor", static_cast<u32>(winver.dwMinorVersion));
|
||||
builder.AddData("win-ver-build", static_cast<u32>(winver.dwBuildNumber));
|
||||
builder.AddData("win-ver-spmajor", static_cast<u32>(winver.wServicePackMajor));
|
||||
builder.AddData("win-ver-spminor", static_cast<u32>(winver.wServicePackMinor));
|
||||
}
|
||||
const auto winver = WindowsRegistry::GetOSVersion();
|
||||
builder.AddData("win-ver-major", static_cast<u32>(winver.dwMajorVersion));
|
||||
builder.AddData("win-ver-minor", static_cast<u32>(winver.dwMinorVersion));
|
||||
builder.AddData("win-ver-build", static_cast<u32>(winver.dwBuildNumber));
|
||||
#elif defined(ANDROID)
|
||||
builder.AddData("os-type", "android");
|
||||
builder.AddData("android-manufacturer", s_get_val_func("DEVICE_MANUFACTURER"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue