Fixed build warnings and errors

This commit is contained in:
Sam Lantinga
2016-10-01 14:48:18 -07:00
parent f8ebc57df8
commit 7b3b8b21f0
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);