mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-16 14:56:00 +00:00
Remove SDL_SCALEMODE_BEST
Fixes https://github.com/libsdl-org/SDL/issues/10619
This commit is contained in:
@@ -1135,10 +1135,6 @@ static bool InitSamplers(GPU_RenderData *data)
|
||||
{ SDL_TEXTURE_ADDRESS_CLAMP, SDL_SCALEMODE_LINEAR },
|
||||
{ SDL_GPU_SAMPLERADDRESSMODE_REPEAT, SDL_GPU_FILTER_LINEAR, SDL_GPU_SAMPLERMIPMAPMODE_LINEAR, 0 },
|
||||
},
|
||||
{
|
||||
{ SDL_TEXTURE_ADDRESS_CLAMP, SDL_SCALEMODE_BEST },
|
||||
{ SDL_GPU_SAMPLERADDRESSMODE_REPEAT, SDL_GPU_FILTER_LINEAR, SDL_GPU_SAMPLERMIPMAPMODE_LINEAR, 16 },
|
||||
},
|
||||
{
|
||||
{ SDL_TEXTURE_ADDRESS_WRAP, SDL_SCALEMODE_NEAREST },
|
||||
{ SDL_GPU_SAMPLERADDRESSMODE_REPEAT, SDL_GPU_FILTER_NEAREST, SDL_GPU_SAMPLERMIPMAPMODE_NEAREST, 0 },
|
||||
@@ -1147,10 +1143,6 @@ static bool InitSamplers(GPU_RenderData *data)
|
||||
{ SDL_TEXTURE_ADDRESS_WRAP, SDL_SCALEMODE_LINEAR },
|
||||
{ SDL_GPU_SAMPLERADDRESSMODE_REPEAT, SDL_GPU_FILTER_LINEAR, SDL_GPU_SAMPLERMIPMAPMODE_LINEAR, 0 },
|
||||
},
|
||||
{
|
||||
{ SDL_TEXTURE_ADDRESS_WRAP, SDL_SCALEMODE_BEST },
|
||||
{ SDL_GPU_SAMPLERADDRESSMODE_REPEAT, SDL_GPU_FILTER_LINEAR, SDL_GPU_SAMPLERMIPMAPMODE_LINEAR, 16 },
|
||||
},
|
||||
};
|
||||
|
||||
for (Uint32 i = 0; i < SDL_arraysize(configs); ++i) {
|
||||
|
@@ -526,10 +526,6 @@ int SDLTest_CommonArg(SDLTest_CommonState *state, int index)
|
||||
state->logical_scale_mode = SDL_SCALEMODE_LINEAR;
|
||||
return 2;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "best") == 0) {
|
||||
state->logical_scale_mode = SDL_SCALEMODE_BEST;
|
||||
return 2;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "--scale") == 0) {
|
||||
@@ -1049,9 +1045,6 @@ static void SDLTest_PrintScaleMode(char *text, size_t maxlen, SDL_ScaleMode scal
|
||||
case SDL_SCALEMODE_LINEAR:
|
||||
SDL_snprintfcat(text, maxlen, "LINEAR");
|
||||
break;
|
||||
case SDL_SCALEMODE_BEST:
|
||||
SDL_snprintfcat(text, maxlen, "BEST");
|
||||
break;
|
||||
default:
|
||||
SDL_snprintfcat(text, maxlen, "0x%8.8x", scale_mode);
|
||||
break;
|
||||
|
@@ -80,7 +80,7 @@ bool SDL_SoftStretch(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst
|
||||
return result;
|
||||
}
|
||||
|
||||
if (scaleMode != SDL_SCALEMODE_NEAREST && scaleMode != SDL_SCALEMODE_LINEAR && scaleMode != SDL_SCALEMODE_BEST) {
|
||||
if (scaleMode != SDL_SCALEMODE_NEAREST && scaleMode != SDL_SCALEMODE_LINEAR) {
|
||||
return SDL_InvalidParamError("scaleMode");
|
||||
}
|
||||
|
||||
|
@@ -1093,8 +1093,7 @@ SDL_bool SDL_BlitSurfaceScaled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Su
|
||||
} else if ((src->flags & SDL_SURFACE_LOCKED) || (dst->flags & SDL_SURFACE_LOCKED)) {
|
||||
return SDL_SetError("Surfaces must not be locked during blit");
|
||||
} else if (scaleMode != SDL_SCALEMODE_NEAREST &&
|
||||
scaleMode != SDL_SCALEMODE_LINEAR &&
|
||||
scaleMode != SDL_SCALEMODE_BEST) {
|
||||
scaleMode != SDL_SCALEMODE_LINEAR) {
|
||||
return SDL_InvalidParamError("scaleMode");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user