diff options
author | Matthias Kortstiege <mkortstiege@users.noreply.github.com> | 2014-07-01 10:01:13 +0200 |
---|---|---|
committer | Matthias Kortstiege <mkortstiege@users.noreply.github.com> | 2014-07-01 10:01:13 +0200 |
commit | 4b83c3980ca976a540bced8468ff0893f31bc590 (patch) | |
tree | e88fd049ce334ac8bc177b79121ba09b5154f08f | |
parent | 81b0220250eb278acd0bfd5d4a5a0b39bb467b4d (diff) | |
parent | ff4e1b3e91144c1dc398da13cfd19a5cbf304d0a (diff) |
Merge pull request #4949 from ksooo/add-support-for-remote-key-eject
Added support for remote key "eject".
-rw-r--r-- | system/keymaps/remote.xml | 1 | ||||
-rw-r--r-- | xbmc/input/ButtonTranslator.cpp | 1 | ||||
-rw-r--r-- | xbmc/input/XBIRRemote.h | 2 | ||||
-rw-r--r-- | xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 5 |
4 files changed, 8 insertions, 1 deletions
diff --git a/system/keymaps/remote.xml b/system/keymaps/remote.xml index aa5c83a4d8..58054c0813 100644 --- a/system/keymaps/remote.xml +++ b/system/keymaps/remote.xml @@ -60,6 +60,7 @@ <display>FullScreen</display> <start>PreviousMenu</start> <record>Record</record> + <eject>XBMC.EjectTray()</eject> <volumeplus>VolumeUp</volumeplus> <volumeminus>VolumeDown</volumeminus> <mute>Mute</mute> diff --git a/xbmc/input/ButtonTranslator.cpp b/xbmc/input/ButtonTranslator.cpp index f4293f73d7..505ed61a3f 100644 --- a/xbmc/input/ButtonTranslator.cpp +++ b/xbmc/input/ButtonTranslator.cpp @@ -1327,6 +1327,7 @@ uint32_t CButtonTranslator::TranslateRemoteString(const char *szButton) else if (strButton.Equals("blue")) buttonCode = XINPUT_IR_REMOTE_BLUE; else if (strButton.Equals("subtitle")) buttonCode = XINPUT_IR_REMOTE_SUBTITLE; else if (strButton.Equals("language")) buttonCode = XINPUT_IR_REMOTE_LANGUAGE; + else if (strButton.Equals("eject")) buttonCode = XINPUT_IR_REMOTE_EJECT; else CLog::Log(LOGERROR, "Remote Translator: Can't find button %s", strButton.c_str()); return buttonCode; } diff --git a/xbmc/input/XBIRRemote.h b/xbmc/input/XBIRRemote.h index 929ffa7cc7..82251c6dfb 100644 --- a/xbmc/input/XBIRRemote.h +++ b/xbmc/input/XBIRRemote.h @@ -93,6 +93,8 @@ #define XINPUT_IR_REMOTE_LIVE_RADIO 248 #define XINPUT_IR_REMOTE_EPG_SEARCH 246 +#define XINPUT_IR_REMOTE_EJECT 235 + // Reserved 256 -> ... // Key.h // KEY_BUTTON_* diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp index 6cd952d005..6950f0c7f9 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp @@ -1030,8 +1030,11 @@ void CPeripheralCecAdapter::PushCecKeypress(const cec_keypress &key) xbmcKey.iButton = XINPUT_IR_REMOTE_SUBTITLE; PushCecKeypress(xbmcKey); break; - case CEC_USER_CONTROL_CODE_POWER_ON_FUNCTION: case CEC_USER_CONTROL_CODE_EJECT: + xbmcKey.iButton = XINPUT_IR_REMOTE_EJECT; + PushCecKeypress(xbmcKey); + break; + case CEC_USER_CONTROL_CODE_POWER_ON_FUNCTION: case CEC_USER_CONTROL_CODE_INPUT_SELECT: case CEC_USER_CONTROL_CODE_INITIAL_CONFIGURATION: case CEC_USER_CONTROL_CODE_HELP: |