mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
SDL: Actually pick the Vulkan device specified in the config.
This commit is contained in:
parent
13cfd9c3d6
commit
5cc85d1df7
@ -69,7 +69,15 @@ bool SDLVulkanGraphicsContext::Init(SDL_Window *&window, int x, int y, int w, in
|
||||
vulkan_ = nullptr;
|
||||
return false;
|
||||
}
|
||||
vulkan_->ChooseDevice(vulkan_->GetBestPhysicalDevice());
|
||||
|
||||
int deviceNum = vulkan_->GetPhysicalDeviceByName(g_Config.sVulkanDevice);
|
||||
if (deviceNum < 0) {
|
||||
deviceNum = vulkan_->GetBestPhysicalDevice();
|
||||
if (!g_Config.sVulkanDevice.empty())
|
||||
g_Config.sVulkanDevice = vulkan_->GetPhysicalDeviceProperties(deviceNum).properties.deviceName;
|
||||
}
|
||||
|
||||
vulkan_->ChooseDevice(deviceNum);
|
||||
if (vulkan_->CreateDevice() != VK_SUCCESS) {
|
||||
*error_message = vulkan_->InitError();
|
||||
delete vulkan_;
|
||||
|
Loading…
Reference in New Issue
Block a user