From f091a656ff178a9d13024cecbe0f919d3ba497d5 Mon Sep 17 00:00:00 2001 From: Andy Vandijck Date: Sat, 28 Jun 2025 15:26:27 +0200 Subject: [PATCH] Fix window props for Vulkan and OpenGL --- src/wx/panel.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp index 8b23446a..1d1c1427 100644 --- a/src/wx/panel.cpp +++ b/src/wx/panel.cpp @@ -2407,9 +2407,14 @@ void SDLDrawingPanel::DrawingPanelInit() } #endif - if (SDL_SetBooleanProperty(props, SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN, true) == false) { - systemScreenMessage(_("Failed to set OpenGL properties")); - } + if ((OPTION(kSDLRenderer) == "opengl") || (OPTION(kSDLRenderer) == "opengles2")) + if (SDL_SetBooleanProperty(props, SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN, true) == false) { + systemScreenMessage(_("Failed to set OpenGL properties")); + } + else if (OPTION(kSDLRenderer) == "vulkan") + if (SDL_SetBooleanProperty(props, SDL_PROP_WINDOW_CREATE_VULKAN_BOOLEAN, true) == false) { + systemScreenMessage(_("Failed to set Vulkan properties")); + } sdlwindow = SDL_CreateWindowWithProperties(props);