mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-26 11:11:48 +01:00
Merge pull request #351 from ds22x/master
Libretro: Add an option to remove left side border ( Sega Master System)
This commit is contained in:
commit
bb8f3b3113
@ -621,6 +621,7 @@ static void config_default(void)
|
||||
config.ntsc = 0;
|
||||
config.lcd = 0;
|
||||
config.render = 0;
|
||||
config.left_border = 0;
|
||||
|
||||
/* input options */
|
||||
input.system[0] = SYSTEM_GAMEPAD;
|
||||
@ -906,6 +907,12 @@ static void update_overclock(void)
|
||||
}
|
||||
#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)
|
||||
{
|
||||
unsigned orig_value;
|
||||
@ -1384,6 +1391,18 @@ static void check_variables(void)
|
||||
else
|
||||
config.invert_mouse = 1;
|
||||
}
|
||||
|
||||
var.key = "genesis_plus_gx_left_border";
|
||||
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
|
||||
{
|
||||
orig_value = config.left_border;
|
||||
if (!var.value || !strcmp(var.value, "disabled"))
|
||||
config.left_border = 0;
|
||||
else if (var.value && !strcmp(var.value, "enabled"))
|
||||
config.left_border = 1;
|
||||
if (orig_value != config.left_border)
|
||||
update_viewports = true;
|
||||
}
|
||||
|
||||
#ifdef HAVE_OVERCLOCK
|
||||
var.key = "genesis_plus_gx_overclock";
|
||||
@ -1434,6 +1453,7 @@ static void check_variables(void)
|
||||
bitmap.viewport.x = (config.overscan & 2) ? 14 : -48;
|
||||
else
|
||||
bitmap.viewport.x = (config.overscan & 2) * 7;
|
||||
check_sms_border();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1996,6 +2016,7 @@ void retro_set_environment(retro_environment_t cb)
|
||||
{ "genesis_plus_gx_lcd_filter", "LCD Ghosting filter; disabled|enabled" },
|
||||
{ "genesis_plus_gx_overscan", "Borders; disabled|top/bottom|left/right|full" },
|
||||
{ "genesis_plus_gx_gg_extra", "Game Gear extended screen; disabled|enabled" },
|
||||
{ "genesis_plus_gx_left_border", "Hide Master System Left Border; disabled|enabled" },
|
||||
{ "genesis_plus_gx_aspect_ratio", "Core-provided aspect ratio; auto|NTSC PAR|PAL PAR" },
|
||||
{ "genesis_plus_gx_render", "Interlaced mode 2 output; single field|double field" },
|
||||
{ "genesis_plus_gx_gun_cursor", "Show Lightgun crosshair; disabled|enabled" },
|
||||
@ -2357,7 +2378,7 @@ bool retro_unserialize(const void *data, size_t size)
|
||||
overclock_delay = OVERCLOCK_FRAME_DELAY;
|
||||
update_overclock();
|
||||
#endif
|
||||
|
||||
check_sms_border();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -2625,6 +2646,7 @@ bool retro_load_game(const struct retro_game_info *info)
|
||||
audio_init(SOUND_FREQUENCY, 0);
|
||||
system_init();
|
||||
system_reset();
|
||||
check_sms_border();
|
||||
is_running = false;
|
||||
|
||||
if (system_hw == SYSTEM_MCD)
|
||||
|
@ -123,6 +123,7 @@ typedef struct
|
||||
uint8 ntsc;
|
||||
uint8 lcd;
|
||||
uint8 gg_extra;
|
||||
uint8 left_border;
|
||||
uint8 render;
|
||||
t_input_config input[MAX_INPUTS];
|
||||
uint8 invert_mouse;
|
||||
|
Loading…
Reference in New Issue
Block a user