movieplayer: better readability in AC3_ATYPE handling

Origin commit data
------------------
Commit: dae1a80d0f
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-10-03 (Sun, 03 Oct 2021)

Origin message was:
------------------
- movieplayer: better readability in AC3_ATYPE handling
This commit is contained in:
vanhofen
2021-10-03 23:09:22 +02:00
parent 6c33baf2f9
commit f2cb67ff74

View File

@@ -2551,7 +2551,7 @@ void CMoviePlayerGui::selectAudioPid()
#if HAVE_CST_HARDWARE
char cnt[5];
sprintf(cnt, "%d", count);
std::string apidtitle = (currentac3 == 0) ? g_Locale->getText(LOCALE_AUDIOMENU_AC3_ATYPE1) : g_Locale->getText(LOCALE_AUDIOMENU_AC3_ATYPE0);
std::string apidtitle = (currentac3 == AC3_ATYPE0) ? g_Locale->getText(LOCALE_AUDIOMENU_AC3_ATYPE1) : g_Locale->getText(LOCALE_AUDIOMENU_AC3_ATYPE0);
CMenuForwarder * item = new CMenuForwarder(apidtitle.c_str(), true, NULL, selector, cnt, CRCInput::convertDigitToKey(count + 1));
APIDSelector.addItem(item, false);
#endif
@@ -2580,8 +2580,16 @@ void CMoviePlayerGui::selectAudioPid()
printf("CMoviePlayerGui::selectAudioPid: selected %d (%x) current %x\n", select, (select >= 0) ? apids[select] : -1, currentapid);
#if HAVE_CST_HARDWARE
if (select == numpida) {
currentac3 == 1 ? currentac3 = 0 : currentac3 = 1;
currentac3 == 1 ? g_settings.movieplayer_select_ac3_atype0 = false : g_settings.movieplayer_select_ac3_atype0 = true;
if (currentac3 == AC3_ATYPE1)
{
currentac3 = AC3_ATYPE0;
g_settings.movieplayer_select_ac3_atype0 = false;
}
else
{
currentac3 = AC3_ATYPE1;
g_settings.movieplayer_select_ac3_atype0 = true;
}
playback->SetAPid(currentapid, currentac3);
printf("[movieplayer] currentac3 changed to %d\n", currentac3);
}