aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Op den Kamp <lars@opdenkamp.eu>2011-10-20 01:32:34 +0200
committerLars Op den Kamp <lars@opdenkamp.eu>2011-10-20 01:32:34 +0200
commitf1d78b33e164caf760351e7318180b6ef7e171d0 (patch)
tree794b33cb40d623c49fd432482704c9f802abeb6b
parent3274a62e9b63ec3a9cf17ab42c72faef8fb3ab1f (diff)
fixed: cec - handle the stop/pause/play buttons on the tv's remote. they're not sent as keypresses but as opcodes PLAY and DECK_CONTROL when XBMC is selected as active playback device
-rw-r--r--xbmc/peripherals/devices/PeripheralCecAdapter.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
index b9a473927a..bc0c7dfa68 100644
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
@@ -406,6 +406,23 @@ void CPeripheralCecAdapter::ProcessNextCommand(void)
SetMenuLanguage(strNewLanguage);
}
break;
+ case CEC_OPCODE_DECK_CONTROL:
+ if (command.initiator == CECDEVICE_TV &&
+ command.parameters.size == 1 &&
+ command.parameters[0] == CEC_DESK_CONTROL_MODE_STOP)
+ {
+ g_application.getApplicationMessenger().MediaStop(false);
+ }
+ break;
+ case CEC_OPCODE_PLAY:
+ if (command.initiator == CECDEVICE_TV &&
+ command.parameters.size == 1)
+ {
+ if (command.parameters[0] == CEC_PLAY_MODE_PLAY_FORWARD ||
+ command.parameters[0] == CEC_PLAY_MODE_PLAY_STILL)
+ g_application.getApplicationMessenger().MediaPause();
+ }
+ break;
default:
break;
}