diff options
author | xhaggi <sascha.woo@gmail.com> | 2014-02-07 19:28:34 +0100 |
---|---|---|
committer | xhaggi <sascha.woo@gmail.com> | 2014-02-10 09:56:53 +0100 |
commit | c6eb32b870ed5ba2dead0a27c880050abd6b0623 (patch) | |
tree | f15e2b763f27d095318dcd9346bdef676c84dcda | |
parent | 84ec9e1a58c43c6e369102ccd12fecfb891a1bb0 (diff) |
[pvr] fix: missing action mapping for ACTION_RECORD
This adds the missing button translator action "record" poiting to
ACTION_RECORD which is currently used in several PVR related windows,
but could not be used in key mappings.
It also adds a default implementation to GUIWindow which calls the
application player record functionality, so there is no need to use
XBMC.PlayerControls(record) in key mapping anymore.
Furthermore the default mapping for the record button in remote.xml is
changed to this new action.
-rw-r--r-- | system/keymaps/remote.xml | 2 | ||||
-rw-r--r-- | xbmc/Application.cpp | 7 | ||||
-rw-r--r-- | xbmc/input/ButtonTranslator.cpp | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/system/keymaps/remote.xml b/system/keymaps/remote.xml index 7d0061fd8e..26f474d204 100644 --- a/system/keymaps/remote.xml +++ b/system/keymaps/remote.xml @@ -59,7 +59,7 @@ <skipminus>SkipPrevious</skipminus> <display>FullScreen</display> <start>PreviousMenu</start> - <record>Screenshot</record> + <record>Record</record> <volumeplus>VolumeUp</volumeplus> <volumeminus>VolumeDown</volumeminus> <mute>Mute</mute> diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index d310d47d75..c79a560162 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -2748,6 +2748,13 @@ bool CApplication::OnAction(const CAction &action) } } + // record current file + if (action.GetID() == ACTION_RECORD) + { + if (m_pPlayer->CanRecord()) + m_pPlayer->Record(!m_pPlayer->IsRecording()); + } + if (m_playerController->OnAction(action)) return true; } diff --git a/xbmc/input/ButtonTranslator.cpp b/xbmc/input/ButtonTranslator.cpp index c9d3161066..0a9d36b5d2 100644 --- a/xbmc/input/ButtonTranslator.cpp +++ b/xbmc/input/ButtonTranslator.cpp @@ -242,6 +242,7 @@ static const ActionMapping actions[] = {"playpvr" , ACTION_PVR_PLAY}, {"playpvrtv" , ACTION_PVR_PLAY_TV}, {"playpvrradio" , ACTION_PVR_PLAY_RADIO}, + {"record" , ACTION_RECORD}, // Mouse actions {"leftclick" , ACTION_MOUSE_LEFT_CLICK}, |