adjust Zapper tolerance; make Zapper input tolerance circular rather than rectangular by default

This commit is contained in:
arpruss
2020-05-05 15:42:26 -05:00
parent b4c57771d2
commit a125c1eec6
3 changed files with 89 additions and 3 deletions

View File

@@ -60,6 +60,8 @@ void linearFree(void* mem);
RETRO_HW_RENDER_INTEFACE_GSKIT_PS2 *ps2 = NULL;
#endif
extern void FCEU_ZapperSetTolerance(int t);
static retro_video_refresh_t video_cb = NULL;
static retro_input_poll_t poll_cb = NULL;
static retro_input_state_t input_cb = NULL;
@@ -1300,6 +1302,16 @@ static void check_variables(bool startup)
else zappermode = RetroLightgun; /*default setting*/
}
var.key = "fceumm_zapper_tolerance";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
FCEU_ZapperSetTolerance(atoi(var.value));
}
var.key = "fceumm_region";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
var.key = "fceumm_show_crosshair";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)

View File

@@ -232,6 +232,48 @@ struct retro_core_option_definition option_defs_common[] = {
},
"enabled",
},
{
"fceumm_zapper_tolerance",
"Zapper Tolerance",
"Sets how many pixels from target area is on target.",
{
{ "0", NULL },
{ "1", NULL },
{ "2", NULL },
{ "3", NULL },
{ "4", NULL },
{ "5", NULL },
{ "6", NULL },
{ "7", NULL },
{ "8", NULL },
{ "9", NULL },
{ "10", NULL },
{ "11", NULL },
{ "12", NULL },
{ "13", NULL },
{ "14", NULL },
{ "15", NULL },
{ "16", NULL },
{ "17", NULL },
{ "18", NULL },
{ "19", NULL },
{ "20", NULL },
{ "21", NULL },
{ "22", NULL },
{ "23", NULL },
{ "24", NULL },
{ "25", NULL },
{ "26", NULL },
{ "27", NULL },
{ "28", NULL },
{ "29", NULL },
{ "30", NULL },
{ "31", NULL },
{ "32", NULL },
{ NULL, NULL },
},
"6",
},
{
"fceumm_sndquality",
"Sound Quality",