mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-12-18 00:06:55 +00:00
wayland: Don't initialize OpenGL when the window flags didn't specify it
Applications that don't specify a rendering flag are likely handling Vulkan/GL themselves, so SDL loading OpenGL by default in this case is unnecessary overhead, and if a render backend requires it, the window will be recreated with the appropriate flags when the renderer is initialized.
This commit is contained in:
parent
425062c123
commit
9ab2025127
@ -2089,13 +2089,6 @@ int Wayland_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window)
|
||||
c = _this->driverdata;
|
||||
window->driverdata = data;
|
||||
|
||||
if (!(window->flags & SDL_WINDOW_VULKAN)) {
|
||||
if (!(window->flags & SDL_WINDOW_OPENGL)) {
|
||||
SDL_GL_LoadLibrary(NULL);
|
||||
window->flags |= SDL_WINDOW_OPENGL;
|
||||
}
|
||||
}
|
||||
|
||||
if (window->x == SDL_WINDOWPOS_UNDEFINED) {
|
||||
window->x = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user