Revert "- audio_select: copy full code from TangoCash"

This reverts commit 18bbbbabfe.

Conflicts:
	data/locale/deutsch.locale
	data/locale/english.locale
	src/gui/audio_select.cpp
	src/system/setting_helpers.cpp
	src/system/setting_helpers.h


Origin commit data
------------------
Commit: 2cd2a8599c
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-01-03 (Wed, 03 Jan 2018)
This commit is contained in:
vanhofen
2018-01-03 11:55:54 +01:00
parent d4af3caaef
commit 2e5ce4bf28
7 changed files with 63 additions and 233 deletions

View File

@@ -53,13 +53,11 @@
#include <config.h>
#include <playback.h>
#include <global.h>
#include <neutrino.h>
#include <gui/widget/stringinput.h>
#include <gui/infoclock.h>
#include <gui/infoviewer.h>
#include <gui/movieplayer.h>
#include <driver/display.h>
#include <driver/volume.h>
#include <system/helpers.h>
@@ -470,19 +468,9 @@ bool CFontSizeNotifier::changeNotify(const neutrino_locale_t, void *)
int CSubtitleChangeExec::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
{
printf("CSubtitleChangeExec::exec: action %s\n", actionKey.c_str());
CMoviePlayerGui *mp = &CMoviePlayerGui::getInstance();
bool is_mp = mp->Playing();
if(actionKey == "off") {
tuxtx_stop_subtitle();
if (!is_mp && dvbsub_getpid() > 0)
dvbsub_stop();
if (is_mp && playback) {
playback->SetSubtitlePid(0);
playback->SetTeletextPid(0);
mp->setCurrentTTXSub("");
}
dvbsub_stop();
return menu_return::RETURN_EXIT;
}
if(!strncmp(actionKey.c_str(), "DVB", 3)) {
@@ -491,7 +479,7 @@ printf("CSubtitleChangeExec::exec: action %s\n", actionKey.c_str());
tuxtx_stop_subtitle();
dvbsub_pause();
dvbsub_start(pid);
} else if (!strncmp(actionKey.c_str(), "TTX", 3)) {
} else {
char const * ptr = strchr(actionKey.c_str(), ':');
ptr++;
int pid = atoi(ptr);
@@ -504,29 +492,7 @@ printf("CSubtitleChangeExec::exec: TTX, pid %x page %x lang %s\n", pid, page, pt
tuxtx_stop_subtitle();
tuxtx_set_pid(pid, page, ptr);
dvbsub_stop();
if (is_mp) {
playback->SetSubtitlePid(0);
playback->SetTeletextPid(pid);
tuxtx_set_pid(pid, page, ptr);
#if HAVE_SPARK_HARDWARE
tuxtx_main(pid, page, 0, true);
#else
tuxtx_main(pid, page, 0);
#endif
mp->setCurrentTTXSub(actionKey.c_str());
} else {
tuxtx_set_pid(pid, page, ptr);
tuxtx_main(pid, page);
}
} else if (is_mp && !strncmp(actionKey.c_str(), "SUB", 3)) {
tuxtx_stop_subtitle();
dvbsub_stop();
playback->SetSubtitlePid(0);
playback->SetTeletextPid(0);
mp->setCurrentTTXSub("");
char const * pidptr = strchr(actionKey.c_str(), ':');
int pid = atoi(pidptr+1);
playback->SetSubtitlePid(pid);
tuxtx_main(pid, page);
}
return menu_return::RETURN_EXIT;
}