diff options
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/gwps-common.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index b53d68d6ba..3fd77a2211 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c | |||
@@ -196,10 +196,10 @@ bool ffwd_rew(int button) | |||
196 | unsigned int max_step = 0; /* maximum ff/rewind step */ | 196 | unsigned int max_step = 0; /* maximum ff/rewind step */ |
197 | int ff_rewind_count = 0; /* current ff/rewind count (in ticks) */ | 197 | int ff_rewind_count = 0; /* current ff/rewind count (in ticks) */ |
198 | int direction = -1; /* forward=1 or backward=-1 */ | 198 | int direction = -1; /* forward=1 or backward=-1 */ |
199 | long accel_tick = 0; /* next time at which to bump the step size */ | ||
200 | bool exit = false; | 199 | bool exit = false; |
201 | bool usb = false; | 200 | bool usb = false; |
202 | int i = 0; | 201 | int i = 0; |
202 | const long ff_rw_accel = (global_settings.ff_rewind_accel + 3); | ||
203 | 203 | ||
204 | if (button == ACTION_NONE) | 204 | if (button == ACTION_NONE) |
205 | { | 205 | { |
@@ -237,13 +237,8 @@ bool ffwd_rew(int button) | |||
237 | 237 | ||
238 | ff_rewind_count += step * direction; | 238 | ff_rewind_count += step * direction; |
239 | 239 | ||
240 | if (global_settings.ff_rewind_accel != 0 && | 240 | /* smooth seeking by multiplying step by: 1 + (2 ^ -accel) */ |
241 | current_tick >= accel_tick) | 241 | step += step >> ff_rw_accel; |
242 | { | ||
243 | step *= 2; | ||
244 | accel_tick = current_tick + | ||
245 | global_settings.ff_rewind_accel*HZ; | ||
246 | } | ||
247 | } | 242 | } |
248 | else | 243 | else |
249 | { | 244 | { |
@@ -268,9 +263,6 @@ bool ffwd_rew(int button) | |||
268 | wps_state.ff_rewind = true; | 263 | wps_state.ff_rewind = true; |
269 | 264 | ||
270 | step = 1000 * global_settings.ff_rewind_min_step; | 265 | step = 1000 * global_settings.ff_rewind_min_step; |
271 | |||
272 | accel_tick = current_tick + | ||
273 | global_settings.ff_rewind_accel*HZ; | ||
274 | } | 266 | } |
275 | else | 267 | else |
276 | break; | 268 | break; |