diff options
author | Franz Koch <franz.koch@elements-net.de> | 2013-06-05 23:31:34 +0200 |
---|---|---|
committer | Joakim Plate <elupus@ecce.se> | 2013-08-01 16:59:02 +0200 |
commit | 5bc412fed0f8ec3d01d5165769df3bb455422c07 (patch) | |
tree | d965363d0e7e963a98de4e7816f5ccb22f38e6cb | |
parent | eca8ca6d4f712300e552faf16ca7eb832e519887 (diff) |
[3D] add cAction to toggle between stereoscopic/3D and mono/2D mode
-rw-r--r-- | xbmc/guilib/Key.h | 1 | ||||
-rw-r--r-- | xbmc/guilib/StereoscopicsManager.cpp | 14 | ||||
-rw-r--r-- | xbmc/input/ButtonTranslator.cpp | 1 |
3 files changed, 16 insertions, 0 deletions
diff --git a/xbmc/guilib/Key.h b/xbmc/guilib/Key.h index 8a425ddece..3bb2621134 100644 --- a/xbmc/guilib/Key.h +++ b/xbmc/guilib/Key.h @@ -323,6 +323,7 @@ #define ACTION_STEREOMODE_PREVIOUS 236 #define ACTION_STEREOMODE_TOGGLE 237 // turns 3d mode on/off #define ACTION_STEREOMODE_SELECT 238 +#define ACTION_STEREOMODE_TOMONO 239 #define ACTION_SETTINGS_RESET 240 #define ACTION_SETTINGS_LEVEL_CHANGE 241 diff --git a/xbmc/guilib/StereoscopicsManager.cpp b/xbmc/guilib/StereoscopicsManager.cpp index c0993c9da8..0474a71a88 100644 --- a/xbmc/guilib/StereoscopicsManager.cpp +++ b/xbmc/guilib/StereoscopicsManager.cpp @@ -321,6 +321,20 @@ bool CStereoscopicsManager::OnAction(const CAction &action) SetStereoMode(selectedMode); return true; } + else if (action.GetID() == ACTION_STEREOMODE_TOMONO) + { + if (mode == RENDER_STEREO_MODE_MONO) + { + RENDER_STEREO_MODE targetMode = m_lastStereoMode; + if (targetMode == RENDER_STEREO_MODE_OFF) + targetMode = GetPreferredPlaybackMode(); + SetStereoMode(targetMode); + } + else + { + SetStereoMode(RENDER_STEREO_MODE_MONO); + } + } return false; } diff --git a/xbmc/input/ButtonTranslator.cpp b/xbmc/input/ButtonTranslator.cpp index 9e7a4b8590..811caf00f5 100644 --- a/xbmc/input/ButtonTranslator.cpp +++ b/xbmc/input/ButtonTranslator.cpp @@ -228,6 +228,7 @@ static const ActionMapping actions[] = {"nextstereomode" , ACTION_STEREOMODE_NEXT}, {"previousstereomode" , ACTION_STEREOMODE_PREVIOUS}, {"togglestereomode" , ACTION_STEREOMODE_TOGGLE}, + {"stereomodetomono" , ACTION_STEREOMODE_TOMONO}, // PVR actions {"channelup" , ACTION_CHANNEL_UP}, |