mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
some cec volume fixes
Conflicts: src/neutrino.cpp
This commit is contained in:
@@ -162,6 +162,7 @@ bool CCECSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*/
|
|||||||
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
||||||
if (g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF)
|
if (g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF)
|
||||||
{
|
{
|
||||||
|
g_settings.current_volume = 100;
|
||||||
videoDecoder->SetAudioDestination(g_settings.hdmi_cec_volume);
|
videoDecoder->SetAudioDestination(g_settings.hdmi_cec_volume);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -197,6 +197,7 @@ int CLuaInstMisc::enableMuteIcon(lua_State *L)
|
|||||||
|
|
||||||
int CLuaInstMisc::setVolume(lua_State *L)
|
int CLuaInstMisc::setVolume(lua_State *L)
|
||||||
{
|
{
|
||||||
|
if (g_settings.hdmi_cec_volume) return 0;
|
||||||
CLuaMisc *D = MiscCheckData(L, 1);
|
CLuaMisc *D = MiscCheckData(L, 1);
|
||||||
if (!D) return 0;
|
if (!D) return 0;
|
||||||
lua_Integer vol = luaL_checkint(L, 2);
|
lua_Integer vol = luaL_checkint(L, 2);
|
||||||
|
@@ -475,9 +475,9 @@ int CNeutrinoApp::loadSetup(const char *fname)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// volume
|
// volume
|
||||||
g_settings.current_volume = configfile.getInt32("current_volume", 100);
|
g_settings.current_volume = g_settings.hdmi_cec_volume ? 100 : configfile.getInt32("current_volume", 100);
|
||||||
g_settings.current_volume_step = configfile.getInt32("current_volume_step", 2);
|
g_settings.current_volume_step = configfile.getInt32("current_volume_step", 5);
|
||||||
g_settings.start_volume = configfile.getInt32("start_volume", -1);
|
g_settings.start_volume = g_settings.hdmi_cec_volume ? 100 : configfile.getInt32("start_volume", -1);
|
||||||
if (g_settings.start_volume >= 0)
|
if (g_settings.start_volume >= 0)
|
||||||
g_settings.current_volume = g_settings.hdmi_cec_volume ? 100 : g_settings.start_volume;
|
g_settings.current_volume = g_settings.hdmi_cec_volume ? 100 : g_settings.start_volume;
|
||||||
g_settings.audio_volume_percent_ac3 = configfile.getInt32("audio_volume_percent_ac3", 100);
|
g_settings.audio_volume_percent_ac3 = configfile.getInt32("audio_volume_percent_ac3", 100);
|
||||||
@@ -1657,10 +1657,9 @@ void CNeutrinoApp::saveSetup(const char *fname)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// volume
|
// volume
|
||||||
if (!g_settings.hdmi_cec_volume)
|
configfile.setInt32( "current_volume", g_settings.hdmi_cec_volume ? 100 : g_settings.current_volume );
|
||||||
configfile.setInt32("current_volume", g_settings.current_volume);
|
|
||||||
configfile.setInt32("current_volume_step", g_settings.current_volume_step);
|
configfile.setInt32("current_volume_step", g_settings.current_volume_step);
|
||||||
configfile.setInt32("start_volume", g_settings.start_volume);
|
configfile.setInt32( "start_volume", g_settings.hdmi_cec_volume ? 100 : g_settings.start_volume );
|
||||||
configfile.setInt32("audio_volume_percent_ac3", g_settings.audio_volume_percent_ac3);
|
configfile.setInt32("audio_volume_percent_ac3", g_settings.audio_volume_percent_ac3);
|
||||||
configfile.setInt32("audio_volume_percent_pcm", g_settings.audio_volume_percent_pcm);
|
configfile.setInt32("audio_volume_percent_pcm", g_settings.audio_volume_percent_pcm);
|
||||||
|
|
||||||
@@ -3057,7 +3056,7 @@ TIMER_START();
|
|||||||
ZapStart_arg.ci_delay = g_settings.ci_delay;
|
ZapStart_arg.ci_delay = g_settings.ci_delay;
|
||||||
memcpy(ZapStart_arg.ci_rpr, g_settings.ci_rpr, sizeof(g_settings.ci_rpr));
|
memcpy(ZapStart_arg.ci_rpr, g_settings.ci_rpr, sizeof(g_settings.ci_rpr));
|
||||||
#endif
|
#endif
|
||||||
ZapStart_arg.volume = g_settings.hdmi_cec_volume ? 100 : g_settings.current_volume;
|
ZapStart_arg.volume = g_settings.current_volume;
|
||||||
ZapStart_arg.webtv_xml = &g_settings.webtv_xml;
|
ZapStart_arg.webtv_xml = &g_settings.webtv_xml;
|
||||||
ZapStart_arg.webradio_xml = &g_settings.webradio_xml;
|
ZapStart_arg.webradio_xml = &g_settings.webradio_xml;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user