Oops, we only want to fail creation if the display surface is an OpenGL surface.

This commit is contained in:
Sam Lantinga
2003-12-31 04:48:38 +00:00
parent 6f64e21a20
commit f5c7a503f5

View File

@@ -46,7 +46,7 @@ SDL_Overlay *SDL_CreateYUVOverlay(int w, int h, Uint32 format,
const char *yuv_hwaccel;
SDL_Overlay *overlay;
if ( (SDL_VideoSurface->flags & SDL_OPENGL) == SDL_OPENGL ) {
if ( (display->flags & SDL_OPENGL) == SDL_OPENGL ) {
SDL_SetError("YUV overlays are not supported in OpenGL mode");
return NULL;
}