Skip to content

Commit

Permalink
TEMP: debug switching from 3d to 2d mode while playing
Browse files Browse the repository at this point in the history
  • Loading branch information
anaconda authored and popcornmix committed Jan 6, 2015
1 parent 2449536 commit 3688c6b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions xbmc/guilib/GraphicContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#include "cores/IPlayer.h"
#include <float.h>

#include "utils/log.h"

using namespace std;

extern bool g_fullScreen;
Expand Down Expand Up @@ -450,7 +452,14 @@ void CGraphicContext::SetVideoResolutionInternal(RESOLUTION res, bool forceUpdat
stereo_mode = RENDER_STEREO_MODE_SPLIT_VERTICAL;
else if ((info_last.dwFlags & D3DPRESENTFLAG_MODE3DSBS) != 0
|| (info_last.dwFlags & D3DPRESENTFLAG_MODE3DTB) != 0)
{
CLog::Log(LOGDEBUG, "CGraphicContext::%s info_last either SBS or TB", __FUNCTION__);
stereo_mode = RENDER_STEREO_MODE_OFF;
}

CLog::Log(LOGDEBUG, "CGraphicContext::%s m_stereoMode=%i m_nextStereoMode=%i -> stereo_mode=%i",
__FUNCTION__,
(int)m_stereoMode, (int)m_nextStereoMode, (int)stereo_mode);

if(stereo_mode != m_stereoMode)
{
Expand Down
9 changes: 9 additions & 0 deletions xbmc/guilib/StereoscopicsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ void CStereoscopicsManager::SetStereoMode(const RENDER_STEREO_MODE &mode)
RENDER_STEREO_MODE currentMode = GetStereoMode();
RENDER_STEREO_MODE applyMode = mode;

CLog::Log(LOGDEBUG, "CStereoscopicsManager::%s entering - currentMode=%s (%i) applyMode=%s (%i)",
__FUNCTION__,
GetLabelForStereoMode(currentMode).c_str(), (int)currentMode,
GetLabelForStereoMode(applyMode).c_str(), (int)applyMode);

// resolve automatic mode before applying
if (mode == RENDER_STEREO_MODE_AUTO)
{
Expand All @@ -148,6 +153,10 @@ void CStereoscopicsManager::SetStereoMode(const RENDER_STEREO_MODE &mode)
{
if (!g_Windowing.SupportsStereo(applyMode))
return;

CLog::LogF(LOGDEBUG, "StereoscopicsManager::%s SetInt - applying mode %s (%i)",
__FUNCTION__,
GetLabelForStereoMode(applyMode).c_str(), (int)applyMode);
CSettings::Get().SetInt("videoscreen.stereoscopicmode", applyMode);
}
}
Expand Down

0 comments on commit 3688c6b

Please sign in to comment.