Update minimum Windows version to 10 (to match .NET 8)

This commit is contained in:
Wojtek Figat
2025-06-12 08:31:32 +02:00
parent 0fa53f860a
commit 4240646ec7
3 changed files with 7 additions and 13 deletions

View File

@@ -556,14 +556,8 @@ void WindowsPlatform::PreInit(void* hInstance)
FlaxDbgHelpUnlock();
#endif
// Get system version
GetWindowsVersion(WindowsName, VersionMajor, VersionMinor, VersionBuild);
// Validate platform
if (VersionMajor < 6)
{
Error(TEXT("Not supported operating system version."));
exit(-1);
}
}
bool WindowsPlatform::IsWindows10()
@@ -640,25 +634,25 @@ bool WindowsPlatform::Init()
// Check if can run Engine on current platform
#if WINVER >= 0x0A00
if (!IsWindows10OrGreater() && !IsWindowsServer())
if (VersionMajor < 10 && !IsWindowsServer())
{
Platform::Fatal(TEXT("Flax Engine requires Windows 10 or higher."));
return true;
}
#elif WINVER >= 0x0603
if (!IsWindows8Point1OrGreater() && !IsWindowsServer())
if ((VersionMajor < 8 || (VersionMajor == 8 && VersionMinor == 0)) && !IsWindowsServer())
{
Platform::Fatal(TEXT("Flax Engine requires Windows 8.1 or higher."));
return true;
}
#elif WINVER >= 0x0602
if (!IsWindows8OrGreater() && !IsWindowsServer())
if (VersionMajor < 8 && !IsWindowsServer())
{
Platform::Fatal(TEXT("Flax Engine requires Windows 8 or higher."));
return true;
}
#else
if (!IsWindows7OrGreater() && !IsWindowsServer())
if (VersionMajor < 7 && !IsWindowsServer())
{
Platform::Fatal(TEXT("Flax Engine requires Windows 7 or higher."));
return true;

View File

@@ -17,7 +17,7 @@
// Fix compilation for Windows 8.1 on the latest Windows SDK
typedef enum _MFVideoSphericalFormat { } MFVideoSphericalFormat;
#endif
#if !defined(MF_SOURCE_READER_CURRENT_TYPE_INDEX) && !defined(PLATFORM_GDK)
#if !defined(MF_SOURCE_READER_CURRENT_TYPE_INDEX) && !defined(PLATFORM_GDK) && WINVER < _WIN32_WINNT_WIN10
// Fix compilation for Windows 7 on the latest Windows SDK
#define MF_SOURCE_READER_CURRENT_TYPE_INDEX 0xFFFFFFFF
#endif

View File

@@ -14,7 +14,7 @@ namespace Flax.Build
/// Specifies the minimum Windows version to use (eg. 10).
/// </summary>
[CommandLine("winMinVer", "<version>", "Specifies the minimum Windows version to use (eg. 10).")]
public static string WindowsMinVer = "7";
public static string WindowsMinVer = "10";
}
}