mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-22 22:11:55 +00:00
Only set the OpenGL flag if the OpenVR driver is active
This commit is contained in:
parent
82b3325978
commit
1c51b8dc33
1 changed files with 5 additions and 4 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue