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) {
|
if (_this->Metal_CreateView) {
|
||||||
return SDL_WINDOW_METAL;
|
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
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -2342,10 +2347,6 @@ SDL_Window *SDL_CreateWindowWithProperties(SDL_PropertiesID props)
|
|||||||
flags |= SDL_DefaultGraphicsBackends(_this);
|
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 (flags & SDL_WINDOW_OPENGL) {
|
||||||
if (!_this->GL_CreateContext) {
|
if (!_this->GL_CreateContext) {
|
||||||
SDL_ContextNotSupported("OpenGL");
|
SDL_ContextNotSupported("OpenGL");
|
||||||
|
|||||||
Reference in New Issue
Block a user