--- apps/gui/gwps-common_old.c 2006-08-30 07:00:53.000000000 +0300 +++ apps/gui/gwps-common.c 2006-10-21 20:53:27.000000000 +0300 @@ -937,10 +937,22 @@ #if CONFIG_CODEC == SWCODEC case 'g': /* ReplayGain */ *flags |= WPS_REFRESH_STATIC; + *intval = 1; if(global_settings.replaygain) - *intval = global_settings.replaygain_type+2; - else - *intval = 1; + { /* copy of logic from dsp.c dsp_set_replaygain */ + if ((global_settings.replaygain_type == REPLAYGAIN_TRACK) + || ((global_settings.replaygain_type == REPLAYGAIN_SHUFFLE) + && global_settings.playlist_shuffle)) + { /* we're doing track gain, if there is a tag */ + if (id3->track_gain !=0) + *intval=2; + } + else + { /* so it must be album gain, if there is a tag */ + if (id3->album_gain !=0) + *intval=3; + } + } snprintf(buf, buf_size, "%d", *intval); return buf; #endif