Commit ec5e5212 authored by Luca Barbato's avatar Luca Barbato

macosx: use the default surface on newer sdl

SDL 1.2.14 works fine with default colorspace on macosx and seems
to have some issues with 24bit surfaces and resize in addition.
parent 3ec34462
...@@ -904,11 +904,11 @@ static int video_open(VideoState *is){ ...@@ -904,11 +904,11 @@ static int video_open(VideoState *is){
&& is->height== screen->h && screen->h == h) && is->height== screen->h && screen->h == h)
return 0; return 0;
#ifndef __APPLE__ #if defined(__APPLE__) && !SDL_VERSION_ATLEAST(1, 2, 14)
screen = SDL_SetVideoMode(w, h, 0, flags); /* setting bits_per_pixel = 0 or 32 causes blank video on OS X and older SDL */
#else
/* setting bits_per_pixel = 0 or 32 causes blank video on OS X */
screen = SDL_SetVideoMode(w, h, 24, flags); screen = SDL_SetVideoMode(w, h, 24, flags);
#else
screen = SDL_SetVideoMode(w, h, 0, flags);
#endif #endif
if (!screen) { if (!screen) {
fprintf(stderr, "SDL: could not set video mode - exiting\n"); fprintf(stderr, "SDL: could not set video mode - exiting\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment