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
5 changed files with 19 additions and 15 deletions

View File

@ -137,7 +137,7 @@ Function .onInit
!insertmacro MULTIUSER_INIT !insertmacro MULTIUSER_INIT
; Keep in sync with build_info.txt ; Keep in sync with build_info.txt
!define MIN_WIN10_VERSION 1703 !define MIN_WIN10_VERSION 1903
${IfNot} ${AtLeastwin10} ${IfNot} ${AtLeastwin10}
${OrIfNot} ${AtLeastWaaS} ${MIN_WIN10_VERSION} ${OrIfNot} ${AtLeastWaaS} ${MIN_WIN10_VERSION}
MessageBox MB_OK "At least Windows 10 version ${MIN_WIN10_VERSION} is required." 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 ### Desktop
* OS * OS
* Windows (10 1703 or higher). * Windows (10 1903 or higher).
* Linux. * Linux.
* macOS (10.15 Catalina or higher). * macOS (10.15 Catalina or higher).
* Unix-like systems other than Linux are not officially supported but might work. * Unix-like systems other than Linux are not officially supported but might work.

View File

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

View File

@ -1,6 +1,6 @@
// Indicate the minimum OS version required for the binary to run properly. // 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. // 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 OSMinimumVersionWin11=10.0.22000.0
// This is the runtime which was compiled against - providing a way for Updater to detect if update // 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 #ifdef _WIN32
// Windows codepath: Check the regional information. // Windows codepath: Check the regional information.
// More likely to match the user's physical location than locales are. // 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) const int buffer_size = GetUserDefaultGeoName(nullptr, 0);
GEOID geo = GetUserGeoID(GEOCLASS_NATION); if (buffer_size == 3)
const int buffer_size = GetGeoInfoW(geo, GEO_ISO2, nullptr, 0, 0); {
std::vector<wchar_t> buffer(buffer_size); std::wstring buffer(buffer_size, L'\0');
const int result = GetGeoInfoW(geo, GEO_ISO2, buffer.data(), buffer_size, 0); const int result = GetUserDefaultGeoName(buffer.data(), buffer_size);
if (result != 0) buffer.resize(2);
return TStrToUTF8(buffer.data()); if (result > 0)
return WStringToUTF8(buffer);
}
#endif #endif
// Generic codepath: Check the locales. // Generic codepath: Check the locales.