Navigation Menu

Skip to content

Commit

Permalink
Fixed bug 3061 - Selecting the dummy video driver on Mac OS X results…
Browse files Browse the repository at this point in the history
… in an error

Darren Kulp

The dummy video driver is not available on Mac OS X if SDL_VIDEO_OPENGL is set at library compilation time.

In src/video/SDL_video.c, there is a compile-time check in SDL_CreateWindow() for (SDL_VIDEO_OPENGL && __MACOSX__). When it succeeds, SDL_WINDOW_OPENGL is always requested. Since the dummy video driver does not supply an OpenGL implementation, the error "No OpenGL support in video driver" is supplied to the user, and SDL_CreateWindow() is exited early.
  • Loading branch information
slouken committed Oct 8, 2016
1 parent abefe78 commit 62b9e1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/video/SDL_video.c
Expand Up @@ -1366,7 +1366,9 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)

/* Some platforms have OpenGL enabled by default */
#if (SDL_VIDEO_OPENGL && __MACOSX__) || __IPHONEOS__ || __ANDROID__ || __NACL__
flags |= SDL_WINDOW_OPENGL;
if (SDL_strcmp(_this->name, "dummy") != 0) {
flags |= SDL_WINDOW_OPENGL;
}
#endif
if (flags & SDL_WINDOW_OPENGL) {
if (!_this->GL_CreateContext) {
Expand Down

0 comments on commit 62b9e1c

Please sign in to comment.