UI: Skip Vulkan in API quick selection if unavailable (#1618)

This commit is contained in:
RedBlackAka 2026-01-12 16:38:11 +01:00 committed by GitHub
parent 6be1934af2
commit e37cbcf2ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3677,6 +3677,12 @@ void GMainWindow::UpdateAPIIndicator(bool update) {
if (api_index == static_cast<u32>(Settings::GraphicsAPI::Vulkan)) {
api_index = (api_index + 1) % graphics_apis.size();
}
#else
if (physical_devices.empty()) {
if (api_index == static_cast<u32>(Settings::GraphicsAPI::Vulkan)) {
api_index = (api_index + 1) % graphics_apis.size();
}
}
#endif
Settings::values.graphics_api = static_cast<Settings::GraphicsAPI>(api_index);
}