summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2009-11-01 02:36:51 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2009-11-01 02:36:51 +0000
commit235d1ae79574476b2ed5167b33dc8e06489b35a0 (patch)
treedc3416696b60f4abdb8a387193bc8ad37500a75f /apps/gui
parentbf751924dc4ed49ad0f0fb704531d1e4290b58cb (diff)
downloadrockbox-235d1ae79574476b2ed5167b33dc8e06489b35a0.tar.gz
rockbox-235d1ae79574476b2ed5167b33dc8e06489b35a0.zip
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
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/option_select.c3
-rw-r--r--apps/gui/skin_engine/skin_parser.c1
-rw-r--r--apps/gui/skin_engine/skin_tokens.c4
-rw-r--r--apps/gui/skin_engine/wps_internals.h2
-rw-r--r--apps/gui/wps.c2
5 files changed, 5 insertions, 7 deletions
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c
index 7d142b0311..1f5e8706f9 100644
--- a/apps/gui/option_select.c
+++ b/apps/gui/option_select.c
@@ -564,6 +564,9 @@ bool option_screen(const struct settings_list *setting,
564 /* callback */ 564 /* callback */
565 if ( function ) 565 if ( function )
566 function(*variable); 566 function(*variable);
567 /* if the volume is changing we need to let the skins know */
568 if (function == sound_get_fn(SOUND_VOLUME))
569 global_status.last_volume_change = current_tick;
567 } 570 }
568 return false; 571 return false;
569} 572}
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index 434e7c9fa5..7f6e80d108 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -1632,7 +1632,6 @@ void skin_data_reset(struct wps_data *wps_data)
1632#endif 1632#endif
1633 wps_data->tokens = NULL; 1633 wps_data->tokens = NULL;
1634 wps_data->num_tokens = 0; 1634 wps_data->num_tokens = 0;
1635 wps_data->button_time_volume = 0;
1636 1635
1637#ifdef HAVE_LCD_BITMAP 1636#ifdef HAVE_LCD_BITMAP
1638 wps_data->peak_meter_enabled = false; 1637 wps_data->peak_meter_enabled = false;
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index aeb7bdbbde..5156dd7ce7 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -818,8 +818,8 @@ const char *get_token_value(struct gui_wps *gwps,
818 return NULL; 818 return NULL;
819#endif 819#endif
820 case WPS_TOKEN_BUTTON_VOLUME: 820 case WPS_TOKEN_BUTTON_VOLUME:
821 if (data->button_time_volume && 821 if (global_status.last_volume_change &&
822 TIME_BEFORE(current_tick, data->button_time_volume + 822 TIME_BEFORE(current_tick, global_status.last_volume_change +
823 token->value.i * TIMEOUT_UNIT)) 823 token->value.i * TIMEOUT_UNIT))
824 return "v"; 824 return "v";
825 return NULL; 825 return NULL;
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h
index 1fd68646ad..d54b54ff00 100644
--- a/apps/gui/skin_engine/wps_internals.h
+++ b/apps/gui/skin_engine/wps_internals.h
@@ -264,8 +264,6 @@ struct wps_data
264 /* Total number of tokens in the WPS. During WPS parsing, this is 264 /* Total number of tokens in the WPS. During WPS parsing, this is
265 the index of the token being parsed. */ 265 the index of the token being parsed. */
266 int num_tokens; 266 int num_tokens;
267 /* tick the volume button was last pressed */
268 unsigned int button_time_volume;
269 267
270#ifdef HAVE_LCD_BITMAP 268#ifdef HAVE_LCD_BITMAP
271 bool peak_meter_enabled; 269 bool peak_meter_enabled;
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index e449644502..441ac3f9d8 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -1130,8 +1130,6 @@ long gui_wps_show(void)
1130 1130
1131 if (vol_changed) 1131 if (vol_changed)
1132 { 1132 {
1133 FOR_NB_SCREENS(i)
1134 gui_wps[i].data->button_time_volume = current_tick;
1135 bool res = false; 1133 bool res = false;
1136 setvol(); 1134 setvol();
1137 FOR_NB_SCREENS(i) 1135 FOR_NB_SCREENS(i)