rem: size->width = (int) (src->w * scale / (float)GSCALE_IDENTITY); size->height = (int) (src->h * scale / (float)GSCALE_IDENTITY);
add: if (!src_mipmap) { size->width = (int) (src->w * scale / (float)GSCALE_IDENTITY); size->height = (int) (src->h * scale / (float)GSCALE_IDENTITY); } else {    SDL_Surface *mipmap = (SDL_Surface *)src_mipmap; float ratio = (scale / (float)GSCALE_IDENTITY) * 2.0f - 1.0f; if (ratio < 0.0f) ratio = 0.0f; else if (ratio > 1.0f) ratio = 1.0f;  size->width = (int)((src->w - mipmap->w) * ratio + mipmap->w); size->height = (int)((src->h - mipmap->h) * ratio + mipmap->h); }
context: TFB_DrawCanvas_GetScaledExtent (TFB_Canvas src_canvas, int scale, PEXTENT size){	SDL_Surface *src = (SDL_Surface *)src_canvas;	size->width = (int) (src->w * scale / (float)GSCALE_IDENTITY);	size->height = (int) (src->h * scale / (float)GSCALE_IDENTITY);	if (!size->width && src->w)		size->width = 1;	if (!size->height && src->h)		size->height = 1;}