platform, improve 32x handling for h32 (all supported platforms)

This commit is contained in:
kub 2021-11-23 21:49:34 +01:00
parent 52e4a905c8
commit 1bbe9abf75
4 changed files with 39 additions and 33 deletions

View file

@ -501,9 +501,13 @@ static void vid_reset_mode(void)
int gp2x_mode = 16;
int renderer = get_renderer();
PicoIn.opt &= ~POPT_ALT_RENDERER;
emu_scan_begin = NULL;
emu_scan_end = NULL;
PicoIn.opt &= ~(POPT_ALT_RENDERER|POPT_DIS_32C_BORDER|POPT_EN_SOFTSCALE);
if (currentConfig.scaling == EOPT_SCALE_SW) {
PicoIn.opt |= POPT_EN_SOFTSCALE;
PicoIn.filter = EOPT_FILTER_BILINEAR2;
} else if (currentConfig.scaling == EOPT_SCALE_HW)
// hw scaling, render without any padding
PicoIn.opt |= POPT_DIS_32C_BORDER;
switch (renderer) {
case RT_16BIT:
@ -535,6 +539,9 @@ static void vid_reset_mode(void)
gp2x_mode = 16;
}
emu_scan_begin = NULL;
emu_scan_end = NULL;
if (currentConfig.EmuOpt & EOPT_WIZ_TEAR_FIX) {
if ((PicoIn.AHW & PAHW_32X) || renderer == RT_16BIT) {
emu_scan_begin = EmuScanBegin16_rot;
@ -572,14 +579,6 @@ static void vid_reset_mode(void)
Pico.m.dirtyPal = 1;
PicoIn.opt &= ~(POPT_DIS_32C_BORDER|POPT_EN_SOFTSCALE);
if (currentConfig.scaling == EOPT_SCALE_SW) {
PicoIn.opt |= POPT_EN_SOFTSCALE;
PicoIn.filter = EOPT_FILTER_BILINEAR2;
} else if (currentConfig.scaling == EOPT_SCALE_HW)
// hw scaling, render without any padding
PicoIn.opt |= POPT_DIS_32C_BORDER;
// palette converters for 8bit modes
make_local_pal = (PicoIn.AHW & PAHW_SMS) ? make_local_pal_sms : make_local_pal_md;
}