Tab cleanup

This commit is contained in:
sonninnos 2024-05-19 07:15:21 +03:00
parent 41b01620b9
commit 02e7c3a4ef

View File

@ -255,38 +255,37 @@ static void check_variables(bool startup)
if (startup)
{
var.key = "beetle_saturn_cdimagecache";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
cdimagecache = false;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var)
&& var.value)
if (!strcmp(var.value, "enabled"))
cdimagecache = true;
}
var.key = "beetle_saturn_shared_int";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
if (!strcmp(var.value, "enabled"))
shared_intmemory_toggle = true;
else if (!strcmp(var.value, "disabled"))
shared_intmemory_toggle = false;
}
var.key = "beetle_saturn_shared_ext";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
if (!strcmp(var.value, "enabled"))
shared_backup_toggle = true;
else if (!strcmp(var.value, "disabled"))
shared_backup_toggle = false;
}
}
var.key = "beetle_saturn_region";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
if (!strcmp(var.value, "Auto Detect") || !strcmp(var.value, "auto"))
@ -310,7 +309,7 @@ static void check_variables(bool startup)
}
var.key = "beetle_saturn_cart";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
if (!strcmp(var.value, "Auto Detect") || !strcmp(var.value, "auto"))
@ -330,7 +329,7 @@ static void check_variables(bool startup)
}
var.key = "beetle_saturn_multitap_port1";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
bool connected = false;
@ -343,7 +342,7 @@ static void check_variables(bool startup)
}
var.key = "beetle_saturn_multitap_port2";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
bool connected = false;
@ -355,10 +354,8 @@ static void check_variables(bool startup)
input_multitap( 2, connected );
}
var.key = "beetle_saturn_opposite_directions";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
if (!strcmp(var.value, "enabled"))
@ -368,7 +365,7 @@ static void check_variables(bool startup)
}
var.key = "beetle_saturn_midsync";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
if (!strcmp(var.value, "enabled"))
@ -378,7 +375,7 @@ static void check_variables(bool startup)
}
var.key = "beetle_saturn_autortc";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
if (!strcmp(var.value, "enabled"))
@ -388,7 +385,7 @@ static void check_variables(bool startup)
}
var.key = "beetle_saturn_autortc_lang";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
if (!strcmp(var.value, "english"))
@ -406,42 +403,42 @@ static void check_variables(bool startup)
}
var.key = "beetle_saturn_horizontal_overscan";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
h_mask = atoi(var.value);
}
var.key = "beetle_saturn_initial_scanline";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
first_sl = atoi(var.value);
}
var.key = "beetle_saturn_last_scanline";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
last_sl = atoi(var.value);
}
var.key = "beetle_saturn_initial_scanline_pal";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
first_sl_pal = atoi(var.value);
}
var.key = "beetle_saturn_last_scanline_pal";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
last_sl_pal = atoi(var.value);
}
var.key = "beetle_saturn_horizontal_blend";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
bool newval = (!strcmp(var.value, "enabled"));
@ -450,36 +447,49 @@ static void check_variables(bool startup)
var.key = "beetle_saturn_analog_stick_deadzone";
var.value = NULL;
if ( environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value )
input_set_deadzone_stick( atoi( var.value ) );
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
input_set_deadzone_stick(atoi(var.value));
}
var.key = "beetle_saturn_trigger_deadzone";
var.value = NULL;
if ( environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value )
input_set_deadzone_trigger( atoi( var.value ) );
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
input_set_deadzone_trigger(atoi(var.value));
}
var.key = "beetle_saturn_mouse_sensitivity";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
input_set_mouse_sensitivity(atoi(var.value));
}
if ( environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value )
input_set_mouse_sensitivity( atoi( var.value ) );
var.key = "beetle_saturn_virtuagun_crosshair";
var.key = "beetle_saturn_virtuagun_input";
var.value = NULL;
if ( environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value )
{
if ( !strcmp(var.value, "Off") ) {
setting_gun_crosshair = SETTING_GUN_CROSSHAIR_OFF;
} else if ( !strcmp(var.value, "Cross") ) {
setting_gun_crosshair = SETTING_GUN_CROSSHAIR_CROSS;
} else if ( !strcmp(var.value, "Dot") ) {
setting_gun_crosshair = SETTING_GUN_CROSSHAIR_DOT;
if ( !strcmp(var.value, "Touchscreen") ) {
setting_gun_input = SETTING_GUN_INPUT_POINTER;
} else {
setting_gun_input = SETTING_GUN_INPUT_LIGHTGUN;
}
}
var.key = "beetle_saturn_virtuagun_crosshair";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
if (!strcmp(var.value, "Off"))
setting_gun_crosshair = SETTING_GUN_CROSSHAIR_OFF;
else if (!strcmp(var.value, "Cross"))
setting_gun_crosshair = SETTING_GUN_CROSSHAIR_CROSS;
else if (!strcmp(var.value, "Dot"))
setting_gun_crosshair = SETTING_GUN_CROSSHAIR_DOT;
}
var.key = "beetle_saturn_crosshair_color_p1";
var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
@ -535,17 +545,6 @@ static void check_variables(bool startup)
SMPC_SetCrosshairsColor(0, setting_crosshair_color_p1);
SMPC_SetCrosshairsColor(1, setting_crosshair_color_p2);
var.key = "beetle_saturn_virtuagun_input";
var.value = NULL;
if ( environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value )
{
if ( !strcmp(var.value, "Touchscreen") ) {
setting_gun_input = SETTING_GUN_INPUT_POINTER;
} else {
setting_gun_input = SETTING_GUN_INPUT_LIGHTGUN;
}
}
}
static bool MDFNI_LoadGame( const char *name )