diff --git a/Source/Engine/Platform/Windows/WindowsPlatform.cpp b/Source/Engine/Platform/Windows/WindowsPlatform.cpp index 697174a47..272d38cf7 100644 --- a/Source/Engine/Platform/Windows/WindowsPlatform.cpp +++ b/Source/Engine/Platform/Windows/WindowsPlatform.cpp @@ -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; diff --git a/Source/Engine/Video/MF/VideoBackendMF.cpp b/Source/Engine/Video/MF/VideoBackendMF.cpp index 01d6ec481..75950f3aa 100644 --- a/Source/Engine/Video/MF/VideoBackendMF.cpp +++ b/Source/Engine/Video/MF/VideoBackendMF.cpp @@ -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 diff --git a/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchain.cs b/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchain.cs index b33ca5e25..428cc2437 100644 --- a/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchain.cs +++ b/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchain.cs @@ -14,7 +14,7 @@ namespace Flax.Build /// Specifies the minimum Windows version to use (eg. 10). /// [CommandLine("winMinVer", "", "Specifies the minimum Windows version to use (eg. 10).")] - public static string WindowsMinVer = "7"; + public static string WindowsMinVer = "10"; } }