summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/quickscreen.c4
-rw-r--r--apps/gui/skin_engine/skin_tokens.c13
-rw-r--r--apps/gui/skin_engine/skin_touchsupport.c4
3 files changed, 7 insertions, 14 deletions
diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c
index 6e50d61511..df295a8a95 100644
--- a/apps/gui/quickscreen.c
+++ b/apps/gui/quickscreen.c
@@ -419,9 +419,7 @@ bool quick_screen_quick(int button_enter)
419 if (oldshuffle != global_settings.playlist_shuffle 419 if (oldshuffle != global_settings.playlist_shuffle
420 && audio_status() & AUDIO_STATUS_PLAY) 420 && audio_status() & AUDIO_STATUS_PLAY)
421 { 421 {
422#if CONFIG_CODEC == SWCODEC 422 replaygain_update();
423 dsp_set_replaygain();
424#endif
425 if (global_settings.playlist_shuffle) 423 if (global_settings.playlist_shuffle)
426 playlist_randomise(NULL, current_tick, true); 424 playlist_randomise(NULL, current_tick, true);
427 else 425 else
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index 0f5deedcf9..578a729bb3 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -1420,25 +1420,22 @@ const char *get_token_value(struct gui_wps *gwps,
1420 1420
1421 case SKIN_TOKEN_REPLAYGAIN: 1421 case SKIN_TOKEN_REPLAYGAIN:
1422 { 1422 {
1423 int globtype = global_settings.replaygain_settings.type;
1423 int val; 1424 int val;
1424 1425
1425 if (global_settings.replaygain_type == REPLAYGAIN_OFF) 1426
1427 if (globtype == REPLAYGAIN_OFF)
1426 val = 1; /* off */ 1428 val = 1; /* off */
1427 else 1429 else
1428 { 1430 {
1429 int type; 1431 int type = id3_get_replaygain_mode(id3);
1430 if (LIKELY(id3))
1431 type = get_replaygain_mode(id3->track_gain != 0,
1432 id3->album_gain != 0);
1433 else
1434 type = -1;
1435 1432
1436 if (type < 0) 1433 if (type < 0)
1437 val = 6; /* no tag */ 1434 val = 6; /* no tag */
1438 else 1435 else
1439 val = type + 2; 1436 val = type + 2;
1440 1437
1441 if (global_settings.replaygain_type == REPLAYGAIN_SHUFFLE) 1438 if (globtype == REPLAYGAIN_SHUFFLE)
1442 val += 2; 1439 val += 2;
1443 } 1440 }
1444 1441
diff --git a/apps/gui/skin_engine/skin_touchsupport.c b/apps/gui/skin_engine/skin_touchsupport.c
index a52a88439e..34f616b9a3 100644
--- a/apps/gui/skin_engine/skin_touchsupport.c
+++ b/apps/gui/skin_engine/skin_touchsupport.c
@@ -266,9 +266,7 @@ int skin_get_touchaction(struct wps_data *data, int* edge_offset,
266 { 266 {
267 global_settings.playlist_shuffle = 267 global_settings.playlist_shuffle =
268 !global_settings.playlist_shuffle; 268 !global_settings.playlist_shuffle;
269#if CONFIG_CODEC == SWCODEC 269 replaygain_update();
270 dsp_set_replaygain();
271#endif
272 if (global_settings.playlist_shuffle) 270 if (global_settings.playlist_shuffle)
273 playlist_randomise(NULL, current_tick, true); 271 playlist_randomise(NULL, current_tick, true);
274 else 272 else