mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
Force Vulkan when Wine is detected.
This commit is contained in:
parent
fd9b44f968
commit
1181b5d905
1 changed files with 7 additions and 1 deletions
|
|
@ -556,6 +556,12 @@ static std::unique_ptr<RenderPipeline> g_resolveMsaaDepthPipelines[3];
|
|||
"main", \
|
||||
g_vulkan ? RenderShaderFormat::SPIRV : RenderShaderFormat::DXIL)
|
||||
|
||||
static bool DetectWine()
|
||||
{
|
||||
HMODULE dllHandle = GetModuleHandle("ntdll.dll");
|
||||
return dllHandle != nullptr && GetProcAddress(dllHandle, "wine_get_version") != nullptr;
|
||||
}
|
||||
|
||||
static void CreateHostDevice()
|
||||
{
|
||||
for (uint32_t i = 0; i < 16; i++)
|
||||
|
|
@ -563,7 +569,7 @@ static void CreateHostDevice()
|
|||
|
||||
Window::Init();
|
||||
|
||||
g_vulkan = Config::GraphicsAPI == EGraphicsAPI::Vulkan;
|
||||
g_vulkan = DetectWine() || Config::GraphicsAPI == EGraphicsAPI::Vulkan;
|
||||
|
||||
LoadShaderCache();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue