Merge SDL-ryan-batching-renderer branch to default.

This commit is contained in:
Ryan C. Gordon 2018-10-31 15:03:41 -04:00
commit 62494a2e27
215 changed files with 5146 additions and 2712 deletions

View file

@ -1071,7 +1071,8 @@ GetClosestSupportedFormat(SDL_Renderer * renderer, Uint32 format)
return renderer->info.texture_formats[0];
}
SDL_ScaleMode SDL_GetScaleMode(void)
static SDL_ScaleMode SDL_GetScaleMode(void)
{
const char *hint = SDL_GetHint(SDL_HINT_RENDER_SCALE_QUALITY);
@ -1199,7 +1200,7 @@ SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface)
/* See what the best texture format is */
fmt = surface->format;
if (fmt->Amask || SDL_GetColorKey(surface, NULL) == 0) {
if (fmt->Amask || SDL_HasColorKey(surface)) {
needAlpha = SDL_TRUE;
} else {
needAlpha = SDL_FALSE;
@ -1258,7 +1259,7 @@ SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface)
SDL_GetSurfaceAlphaMod(surface, &a);
SDL_SetTextureAlphaMod(texture, a);
if (SDL_GetColorKey(surface, NULL) == 0) {
if (SDL_HasColorKey(surface)) {
/* We converted to a texture with alpha format */
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
} else {