Fix window props for Vulkan and OpenGL

This commit is contained in:
Andy Vandijck 2025-06-28 15:26:27 +02:00
parent fa40f41866
commit f091a656ff
1 changed files with 8 additions and 3 deletions

View File

@ -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);