Fixed build warnings and errors

This commit is contained in:
Sam Lantinga 2016-10-01 14:48:18 -07:00
parent fae5d0eab3
commit fa0f417631
5 changed files with 19 additions and 16 deletions

View file

@ -1439,7 +1439,10 @@ GL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
return SDL_OutOfMemory();
}
convert_format(data, temp_format, &internalFormat, &format, &type);
if (!convert_format(data, temp_format, &internalFormat, &format, &type)) {
return SDL_SetError("Texture format %s not supported by OpenGL",
SDL_GetPixelFormatName(temp_format));
}
SDL_GetRendererOutputSize(renderer, &w, &h);