Merge pull request #13433 from iwubcode/update_min_win10

Update our minimum windows 10 version to 1903 and reinstate code that depends on it
This commit is contained in:
JMC47 2025-03-25 18:30:15 -04:00 committed by GitHub
commit 1981f22228
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 19 additions and 15 deletions

View File

@ -137,7 +137,7 @@ Function .onInit
!insertmacro MULTIUSER_INIT
; Keep in sync with build_info.txt
!define MIN_WIN10_VERSION 1703
!define MIN_WIN10_VERSION 1903
${IfNot} ${AtLeastwin10}
${OrIfNot} ${AtLeastWaaS} ${MIN_WIN10_VERSION}
MessageBox MB_OK "At least Windows 10 version ${MIN_WIN10_VERSION} is required."

View File

@ -13,7 +13,7 @@ Please read the [FAQ](https://dolphin-emu.org/docs/faq/) before using Dolphin.
### Desktop
* OS
* Windows (10 1703 or higher).
* Windows (10 1903 or higher).
* Linux.
* macOS (10.15 Catalina or higher).
* Unix-like systems other than Linux are not officially supported but might work.

View File

@ -7,7 +7,6 @@
#ifdef _WIN32
#include <Windows.h>
#include <ctime>
#include <timeapi.h>
#else
#include <sys/time.h>
@ -68,10 +67,12 @@ u64 Timer::ElapsedMs() const
u64 Timer::GetLocalTimeSinceJan1970()
{
// TODO Would really, really like to use std::chrono here, but Windows did not support
// std::chrono::current_zone() until 19H1, and other compilers don't even provide support for
// timezone-related parts of chrono. Someday!
// see https://bugs.dolphin-emu.org/issues/13007#note-4
#ifdef _MSC_VER
std::chrono::zoned_seconds seconds(
std::chrono::current_zone(),
std::chrono::time_point_cast<std::chrono::seconds>(std::chrono::system_clock::now()));
return seconds.get_local_time().time_since_epoch().count();
#else
time_t sysTime, tzDiff, tzDST;
time(&sysTime);
tm* gmTime = localtime(&sysTime);
@ -87,6 +88,7 @@ u64 Timer::GetLocalTimeSinceJan1970()
tzDiff = sysTime - mktime(gmTime);
return static_cast<u64>(sysTime + tzDiff + tzDST);
#endif
}
void Timer::IncreaseResolution()

View File

@ -1,6 +1,6 @@
// Indicate the minimum OS version required for the binary to run properly.
// Updater will fail the update if the user does not meet this requirement.
OSMinimumVersionWin10=10.0.15063.0
OSMinimumVersionWin10=10.0.18362.0
OSMinimumVersionWin11=10.0.22000.0
// This is the runtime which was compiled against - providing a way for Updater to detect if update

View File

@ -90,13 +90,15 @@ static std::string ComputeDefaultCountryCode()
#ifdef _WIN32
// Windows codepath: Check the regional information.
// More likely to match the user's physical location than locales are.
// TODO: Can we use GetUserDefaultGeoName? (It was added in a Windows 10 update)
GEOID geo = GetUserGeoID(GEOCLASS_NATION);
const int buffer_size = GetGeoInfoW(geo, GEO_ISO2, nullptr, 0, 0);
std::vector<wchar_t> buffer(buffer_size);
const int result = GetGeoInfoW(geo, GEO_ISO2, buffer.data(), buffer_size, 0);
if (result != 0)
return TStrToUTF8(buffer.data());
const int buffer_size = GetUserDefaultGeoName(nullptr, 0);
if (buffer_size == 3)
{
std::wstring buffer(buffer_size, L'\0');
const int result = GetUserDefaultGeoName(buffer.data(), buffer_size);
buffer.resize(2);
if (result > 0)
return WStringToUTF8(buffer);
}
#endif
// Generic codepath: Check the locales.