From 33a47e4a494764802f63b4b456dbd113df250b37 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sun, 2 Oct 2022 20:42:25 +0100 Subject: Remove ff_rewind from global WPS state Turns out it's local to ffwd_rewind() in the WPS. Change-Id: Iaa6e69185db67b8aad61f1d2ad29c98f15f37370 --- apps/gui/skin_engine/wps_internals.h | 1 - apps/gui/wps.c | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h index 35d7b979fc..4db304297b 100644 --- a/apps/gui/skin_engine/wps_internals.h +++ b/apps/gui/skin_engine/wps_internals.h @@ -402,7 +402,6 @@ struct wps_state struct mp3entry* id3; struct mp3entry* nid3; int ff_rewind_count; - bool ff_rewind; bool paused; bool is_fading; }; diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 4d22a83fd6..b1700459cc 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -207,6 +207,7 @@ static bool ffwd_rew(int button) int direction = -1; /* forward=1 or backward=-1 */ bool exit = false; bool usb = false; + bool ff_rewind = false; const long ff_rw_accel = (global_settings.ff_rewind_accel + 3); if (button == ACTION_NONE) @@ -222,7 +223,7 @@ static bool ffwd_rew(int button) direction = 1; /* Fallthrough */ case ACTION_WPS_SEEKBACK: - if (skin_get_global_state()->ff_rewind) + if (ff_rewind) { if (direction == 1) { @@ -260,7 +261,7 @@ static bool ffwd_rew(int button) else status_set_ffmode(STATUS_FASTBACKWARD); - skin_get_global_state()->ff_rewind = true; + ff_rewind = true; step = 1000 * global_settings.ff_rewind_min_step; } @@ -296,7 +297,7 @@ static bool ffwd_rew(int button) skin_get_global_state()->id3->elapsed = skin_get_global_state()->id3->elapsed+ff_rewind_count; audio_ff_rewind(skin_get_global_state()->id3->elapsed); skin_get_global_state()->ff_rewind_count = 0; - skin_get_global_state()->ff_rewind = false; + ff_rewind = false; status_set_ffmode(0); exit = true; break; @@ -1046,7 +1047,6 @@ static void track_info_callback(unsigned short id, void *param) static void wps_state_init(void) { struct wps_state *state = skin_get_global_state(); - state->ff_rewind = false; state->paused = false; if(audio_status() & AUDIO_STATUS_PLAY) { -- cgit