mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Merge pull request #20493 from hrydgard/misc-fixes
On Windows 11, start defaulting to Vulkan.
This commit is contained in:
@@ -109,6 +109,10 @@ bool IsWin8OrHigher() {
|
||||
return DoesVersionMatchWindows(6, 2, 0, 0, 0, true);
|
||||
}
|
||||
|
||||
bool IsWin11OrHigher() {
|
||||
return DoesVersionMatchWindows(10, 0, 0, 0, 22000, true);
|
||||
}
|
||||
|
||||
std::string GetWindowsVersion() {
|
||||
std::vector<std::pair<std::string, WindowsReleaseInfo>> windowsReleases = {
|
||||
/* { "Preview text", { major, minor, spMajor, spMinor, build, greater } }, */
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
bool IsVistaOrHigher();
|
||||
bool IsWin7OrHigher();
|
||||
bool IsWin8OrHigher();
|
||||
bool IsWin11OrHigher();
|
||||
bool DoesVersionMatchWindows(uint32_t major, uint32_t minor, uint32_t spMajor, uint32_t spMinor, uint32_t build, bool acceptGreater);
|
||||
bool GetVersionFromKernel32(uint32_t& major, uint32_t& minor, uint32_t& build);
|
||||
|
||||
|
||||
+5
-1
@@ -456,7 +456,11 @@ static int DefaultGPUBackend() {
|
||||
}
|
||||
|
||||
#if PPSSPP_PLATFORM(WINDOWS)
|
||||
// If no Vulkan, use Direct3D 11 on Windows 8+ (most importantly 10.)
|
||||
// On Win11, there's a good chance Vulkan will work by default.
|
||||
if (IsWin11OrHigher()) {
|
||||
return (int)GPUBackend::VULKAN;
|
||||
}
|
||||
// On older Windows, to be safe, use Direct3D 11.
|
||||
if (IsWin8OrHigher()) {
|
||||
return (int)GPUBackend::DIRECT3D11;
|
||||
}
|
||||
|
||||
@@ -264,6 +264,7 @@ void D3D11Context::Shutdown() {
|
||||
// Important that we release before we unload the DLL, otherwise we may crash on shutdown.
|
||||
bbRenderTargetTex_ = nullptr;
|
||||
bbRenderTargetView_ = nullptr;
|
||||
swapChain_ = nullptr;
|
||||
context1_ = nullptr;
|
||||
context_ = nullptr;
|
||||
device1_ = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user