mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
Only set the OpenGL flag if the OpenVR driver is active
This commit is contained in:
@@ -277,6 +277,11 @@ static Uint32 SDL_DefaultGraphicsBackends(SDL_VideoDevice *_this)
|
||||
if (_this->Metal_CreateView) {
|
||||
return SDL_WINDOW_METAL;
|
||||
}
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_OPENGL) && defined(SDL_VIDEO_DRIVER_OPENVR)
|
||||
if (SDL_strcmp(_this->name, "openvr") == 0) {
|
||||
return SDL_WINDOW_OPENGL;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@@ -2342,10 +2347,6 @@ SDL_Window *SDL_CreateWindowWithProperties(SDL_PropertiesID props)
|
||||
flags |= SDL_DefaultGraphicsBackends(_this);
|
||||
}
|
||||
|
||||
#if defined(SDL_VIDEO_OPENGL) && defined(SDL_VIDEO_DRIVER_OPENVR)
|
||||
flags |= SDL_WINDOW_OPENGL;
|
||||
#endif
|
||||
|
||||
if (flags & SDL_WINDOW_OPENGL) {
|
||||
if (!_this->GL_CreateContext) {
|
||||
SDL_ContextNotSupported("OpenGL");
|
||||
|
Reference in New Issue
Block a user