mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-27 19:51:48 +01:00
Libretro: Reworked Left Border code so it doesn't affect core source
code.
This commit is contained in:
parent
03d1482b29
commit
751d8867d4
@ -330,12 +330,6 @@ void vdp_reset(void)
|
|||||||
bitmap.viewport.x = (config.overscan & 2) ? 14 : -48;
|
bitmap.viewport.x = (config.overscan & 2) ? 14 : -48;
|
||||||
bitmap.viewport.y = (config.overscan & 1) ? (24 * (vdp_pal + 1)) : -24;
|
bitmap.viewport.y = (config.overscan & 1) ? (24 * (vdp_pal + 1)) : -24;
|
||||||
}
|
}
|
||||||
else if ((system_hw == SYSTEM_SMS || system_hw == SYSTEM_SMS2) && config.left_border)
|
|
||||||
{
|
|
||||||
/* Horizontal display area reduced to 240 when hiding the left border */
|
|
||||||
bitmap.viewport.x = (config.overscan & 2) ? 7 : -8;
|
|
||||||
bitmap.viewport.y = (config.overscan & 1) * 24 * (vdp_pal + 1);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bitmap.viewport.x = (config.overscan & 2) * 7;
|
bitmap.viewport.x = (config.overscan & 2) * 7;
|
||||||
|
@ -907,6 +907,12 @@ static void update_overclock(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static void check_sms_border(void)
|
||||||
|
{
|
||||||
|
if (config.left_border && (bitmap.viewport.x == 0) && ((system_hw == SYSTEM_MARKIII) || (system_hw & SYSTEM_SMS) || (system_hw == SYSTEM_PBC)))
|
||||||
|
bitmap.viewport.x = -8;
|
||||||
|
}
|
||||||
|
|
||||||
static void check_variables(void)
|
static void check_variables(void)
|
||||||
{
|
{
|
||||||
unsigned orig_value;
|
unsigned orig_value;
|
||||||
@ -1445,10 +1451,9 @@ static void check_variables(void)
|
|||||||
bitmap.viewport.changed = 11;
|
bitmap.viewport.changed = 11;
|
||||||
if ((system_hw == SYSTEM_GG) && !config.gg_extra)
|
if ((system_hw == SYSTEM_GG) && !config.gg_extra)
|
||||||
bitmap.viewport.x = (config.overscan & 2) ? 14 : -48;
|
bitmap.viewport.x = (config.overscan & 2) ? 14 : -48;
|
||||||
else if ((system_hw == SYSTEM_SMS || system_hw == SYSTEM_SMS2) && config.left_border)
|
|
||||||
bitmap.viewport.x = (config.overscan & 2) ? 7 : -8;
|
|
||||||
else
|
else
|
||||||
bitmap.viewport.x = (config.overscan & 2) * 7;
|
bitmap.viewport.x = (config.overscan & 2) * 7;
|
||||||
|
check_sms_border();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2373,7 +2378,7 @@ bool retro_unserialize(const void *data, size_t size)
|
|||||||
overclock_delay = OVERCLOCK_FRAME_DELAY;
|
overclock_delay = OVERCLOCK_FRAME_DELAY;
|
||||||
update_overclock();
|
update_overclock();
|
||||||
#endif
|
#endif
|
||||||
|
check_sms_border();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2641,6 +2646,7 @@ bool retro_load_game(const struct retro_game_info *info)
|
|||||||
audio_init(SOUND_FREQUENCY, 0);
|
audio_init(SOUND_FREQUENCY, 0);
|
||||||
system_init();
|
system_init();
|
||||||
system_reset();
|
system_reset();
|
||||||
|
check_sms_border();
|
||||||
is_running = false;
|
is_running = false;
|
||||||
|
|
||||||
if (system_hw == SYSTEM_MCD)
|
if (system_hw == SYSTEM_MCD)
|
||||||
|
Loading…
Reference in New Issue
Block a user