mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-05 12:15:19 +02:00
Merge pull request #19440 from hrydgard/sdl-gl-fallback-fix
SDL: Fix the fallback path from Vulkan to OpenGL
This commit is contained in:
@@ -1134,8 +1134,10 @@ int main(int argc, char *argv[]) {
|
||||
SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");
|
||||
#endif
|
||||
|
||||
bool vulkanMayBeAvailable = false;
|
||||
if (VulkanMayBeAvailable()) {
|
||||
printf("DEBUG: Vulkan might be available.\n");
|
||||
vulkanMayBeAvailable = true;
|
||||
} else {
|
||||
printf("DEBUG: Vulkan is not available, not using Vulkan.\n");
|
||||
}
|
||||
@@ -1327,6 +1329,11 @@ int main(int argc, char *argv[]) {
|
||||
GraphicsContext *graphicsContext = nullptr;
|
||||
SDL_Window *window = nullptr;
|
||||
|
||||
// Switch away from Vulkan if not available.
|
||||
if (g_Config.iGPUBackend == (int)GPUBackend::VULKAN && !vulkanMayBeAvailable) {
|
||||
g_Config.iGPUBackend = (int)GPUBackend::OPENGL;
|
||||
}
|
||||
|
||||
std::string error_message;
|
||||
if (g_Config.iGPUBackend == (int)GPUBackend::OPENGL) {
|
||||
SDLGLGraphicsContext *ctx = new SDLGLGraphicsContext();
|
||||
|
||||
Reference in New Issue
Block a user