mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 00:39:53 +00:00
Cleanup
This commit is contained in:
parent
8165b43170
commit
f292524031
@ -205,44 +205,22 @@ static float recalc_step_based_on_length_of_action(rarch_setting_t *setting)
|
||||
global_t *global = global_get_ptr();
|
||||
if ( global )
|
||||
{
|
||||
#if 0
|
||||
if (setting->enforce_minrange)
|
||||
{
|
||||
float numsteps = (setting->max-setting->min)/setting->step ;
|
||||
float multiplier = 1.0f ;
|
||||
if ( global->menu.action_press_time > _12_SECONDS)
|
||||
multiplier = (numsteps/60.0f);
|
||||
else if ( global->menu.action_press_time > _9_SECONDS)
|
||||
multiplier = (numsteps/300.0f) ;
|
||||
else if ( global->menu.action_press_time > _6_SECONDS)
|
||||
multiplier = (numsteps/750.0f);
|
||||
else if ( global->menu.action_press_time > _3_SECONDS)
|
||||
multiplier = (numsteps/3000.0f) ;
|
||||
else
|
||||
multiplier = 1.0f ;
|
||||
|
||||
step = setting->step*multiplier;
|
||||
}
|
||||
if ( global->menu.action_press_time > _21_SECONDS)
|
||||
step = setting->step*1000000.0f ;
|
||||
else if ( global->menu.action_press_time > _18_SECONDS)
|
||||
step = setting->step*100000.0f ;
|
||||
else if ( global->menu.action_press_time > _15_SECONDS)
|
||||
step = setting->step*10000.0f ;
|
||||
else if ( global->menu.action_press_time > _12_SECONDS)
|
||||
step = setting->step*1000.0f ;
|
||||
else if ( global->menu.action_press_time > _9_SECONDS)
|
||||
step = setting->step*100.0f ;
|
||||
else if ( global->menu.action_press_time > _6_SECONDS)
|
||||
step = setting->step*10.0f ;
|
||||
else if ( global->menu.action_press_time > _3_SECONDS)
|
||||
step = setting->step*5.0f ;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if ( global->menu.action_press_time > _21_SECONDS)
|
||||
step = setting->step*1000000.0f ;
|
||||
else if ( global->menu.action_press_time > _18_SECONDS)
|
||||
step = setting->step*100000.0f ;
|
||||
else if ( global->menu.action_press_time > _15_SECONDS)
|
||||
step = setting->step*10000.0f ;
|
||||
else if ( global->menu.action_press_time > _12_SECONDS)
|
||||
step = setting->step*1000.0f ;
|
||||
else if ( global->menu.action_press_time > _9_SECONDS)
|
||||
step = setting->step*100.0f ;
|
||||
else if ( global->menu.action_press_time > _6_SECONDS)
|
||||
step = setting->step*10.0f ;
|
||||
else if ( global->menu.action_press_time > _3_SECONDS)
|
||||
step = setting->step*5.0f ;
|
||||
else
|
||||
step = setting->step ;
|
||||
}
|
||||
step = setting->step ;
|
||||
}
|
||||
#endif
|
||||
return step < setting->step ? setting->step : step ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user