mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-14 22:05:59 +00:00
SDL_SoftStretch() doesn't handle large pixel formats
Fixes https://github.com/libsdl-org/SDL/issues/11534
This commit is contained in:
@@ -1254,7 +1254,8 @@ bool SDL_BlitSurfaceUncheckedScaled(SDL_Surface *src, const SDL_Rect *srcrect, S
|
||||
if (scaleMode == SDL_SCALEMODE_NEAREST) {
|
||||
if (!(src->map.info.flags & complex_copy_flags) &&
|
||||
src->format == dst->format &&
|
||||
!SDL_ISPIXELFORMAT_INDEXED(src->format)) {
|
||||
!SDL_ISPIXELFORMAT_INDEXED(src->format) &&
|
||||
SDL_BYTESPERPIXEL(src->format) <= 4) {
|
||||
return SDL_SoftStretch(src, srcrect, dst, dstrect, SDL_SCALEMODE_NEAREST);
|
||||
} else if (SDL_BITSPERPIXEL(src->format) < 8) {
|
||||
// Scaling bitmap not yet supported, convert to RGBA for blit
|
||||
|
Reference in New Issue
Block a user