This commit is contained in:
twinaphex 2019-04-21 16:50:25 +02:00
parent 8165b43170
commit f292524031
1 changed files with 15 additions and 37 deletions

View File

@ -205,44 +205,22 @@ static float recalc_step_based_on_length_of_action(rarch_setting_t *setting)
global_t *global = global_get_ptr(); global_t *global = global_get_ptr();
if ( global ) if ( global )
{ {
#if 0 if ( global->menu.action_press_time > _21_SECONDS)
if (setting->enforce_minrange) step = setting->step*1000000.0f ;
{ else if ( global->menu.action_press_time > _18_SECONDS)
float numsteps = (setting->max-setting->min)/setting->step ; step = setting->step*100000.0f ;
float multiplier = 1.0f ; else if ( global->menu.action_press_time > _15_SECONDS)
if ( global->menu.action_press_time > _12_SECONDS) step = setting->step*10000.0f ;
multiplier = (numsteps/60.0f); else if ( global->menu.action_press_time > _12_SECONDS)
else if ( global->menu.action_press_time > _9_SECONDS) step = setting->step*1000.0f ;
multiplier = (numsteps/300.0f) ; else if ( global->menu.action_press_time > _9_SECONDS)
else if ( global->menu.action_press_time > _6_SECONDS) step = setting->step*100.0f ;
multiplier = (numsteps/750.0f); else if ( global->menu.action_press_time > _6_SECONDS)
else if ( global->menu.action_press_time > _3_SECONDS) step = setting->step*10.0f ;
multiplier = (numsteps/3000.0f) ; else if ( global->menu.action_press_time > _3_SECONDS)
else step = setting->step*5.0f ;
multiplier = 1.0f ;
step = setting->step*multiplier;
}
else else
#endif step = setting->step ;
{
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 ;
}
} }
#endif #endif
return step < setting->step ? setting->step : step ; return step < setting->step ? setting->step : step ;