forked from len0rd/rockbox
Fix FS#10745 - %mv not working in sbs...
This fix is as good as we can do, but not perfect. Because the sbs is only updated when a button is pressed it will stay in the "volume changing" state probalby longer than expected.. which isnt terrible, but useful to remember. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23455 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bf751924dc
commit
235d1ae795
8 changed files with 8 additions and 7 deletions
|
|
@ -564,6 +564,9 @@ bool option_screen(const struct settings_list *setting,
|
|||
/* callback */
|
||||
if ( function )
|
||||
function(*variable);
|
||||
/* if the volume is changing we need to let the skins know */
|
||||
if (function == sound_get_fn(SOUND_VOLUME))
|
||||
global_status.last_volume_change = current_tick;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1632,7 +1632,6 @@ void skin_data_reset(struct wps_data *wps_data)
|
|||
#endif
|
||||
wps_data->tokens = NULL;
|
||||
wps_data->num_tokens = 0;
|
||||
wps_data->button_time_volume = 0;
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
wps_data->peak_meter_enabled = false;
|
||||
|
|
|
|||
|
|
@ -818,8 +818,8 @@ const char *get_token_value(struct gui_wps *gwps,
|
|||
return NULL;
|
||||
#endif
|
||||
case WPS_TOKEN_BUTTON_VOLUME:
|
||||
if (data->button_time_volume &&
|
||||
TIME_BEFORE(current_tick, data->button_time_volume +
|
||||
if (global_status.last_volume_change &&
|
||||
TIME_BEFORE(current_tick, global_status.last_volume_change +
|
||||
token->value.i * TIMEOUT_UNIT))
|
||||
return "v";
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -264,8 +264,6 @@ struct wps_data
|
|||
/* Total number of tokens in the WPS. During WPS parsing, this is
|
||||
the index of the token being parsed. */
|
||||
int num_tokens;
|
||||
/* tick the volume button was last pressed */
|
||||
unsigned int button_time_volume;
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
bool peak_meter_enabled;
|
||||
|
|
|
|||
|
|
@ -1130,8 +1130,6 @@ long gui_wps_show(void)
|
|||
|
||||
if (vol_changed)
|
||||
{
|
||||
FOR_NB_SCREENS(i)
|
||||
gui_wps[i].data->button_time_volume = current_tick;
|
||||
bool res = false;
|
||||
setvol();
|
||||
FOR_NB_SCREENS(i)
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ static void app_main(void)
|
|||
}
|
||||
#endif /* #ifdef AUTOROCK */
|
||||
|
||||
global_status.last_volume_change = 0;
|
||||
root_menu();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -739,6 +739,7 @@ void setvol(void)
|
|||
if (global_settings.volume > max_vol)
|
||||
global_settings.volume = max_vol;
|
||||
sound_set_volume(global_settings.volume);
|
||||
global_status.last_volume_change = current_tick;
|
||||
settings_save();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -308,6 +308,7 @@ struct system_status
|
|||
#endif
|
||||
signed char last_screen;
|
||||
int viewer_icon_count;
|
||||
int last_volume_change; /* tick the last volume change happened. skins use this */
|
||||
};
|
||||
|
||||
struct user_settings
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue