GTK+: Fix xBRZ size fallback.

This commit is contained in:
Brandon Wright 2019-01-12 11:58:32 -06:00
parent 8c24f6d49f
commit ebf1b6dadc
1 changed files with 22 additions and 14 deletions

View File

@ -909,22 +909,30 @@ static void internal_filter (uint8 *src_buffer,
#ifdef USE_XBRZ
case FILTER_4XBRZ:
filter_4xBRZ (src_buffer,
src_pitch,
dst_buffer,
dst_pitch,
width,
height);
break;
if (width * 4 <= S9xDisplayDriver::scaled_max_width &&
height * 4 <= S9xDisplayDriver::scaled_max_height)
{
filter_4xBRZ (src_buffer,
src_pitch,
dst_buffer,
dst_pitch,
width,
height);
break;
}
// Fall through
case FILTER_3XBRZ:
filter_3xBRZ (src_buffer,
src_pitch,
dst_buffer,
dst_pitch,
width,
height);
break;
if (width * 3 <= S9xDisplayDriver::scaled_max_width &&
height * 3 <= S9xDisplayDriver::scaled_max_height)
{
filter_3xBRZ (src_buffer,
src_pitch,
dst_buffer,
dst_pitch,
width,
height);
break;
}
// Fall through
case FILTER_2XBRZ:
filter_2xBRZ (src_buffer,