Skip to content

Commit

Permalink
ADD: [AFTV] 3D auto-switch
Browse files Browse the repository at this point in the history
  • Loading branch information
koying authored and popcornmix committed Jan 22, 2015
1 parent 22c8d0b commit 710167b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions xbmc/utils/SystemInfo.cpp
Expand Up @@ -56,6 +56,7 @@
#include "utils/XMLUtils.h"
#if defined(TARGET_ANDROID)
#include "android/jni/Build.h"
#include "utils/SysfsUtils.h"
#include "utils/AMLUtils.h"
#endif

Expand Down Expand Up @@ -872,6 +873,8 @@ bool CSysInfo::HWSupportsStereo(const int mode)
#if defined(TARGET_ANDROID)
if (aml_present())
return aml_supports_stereo(mode);
else if (SysfsUtils::Has("/sys/class/graphics/fb0/3d_present")) // AFTV
return true;
#endif
return false;
}
Expand All @@ -881,6 +884,21 @@ void CSysInfo::HWSetStereoMode(const int mode, const int view)
#if defined(TARGET_ANDROID)
if (aml_present())
aml_set_stereo_mode(mode, view);
else if (SysfsUtils::Has("/sys/class/graphics/fb0/3d_present")) // AFTV
{
switch(mode)
{
default:
SysfsUtils::SetInt("/sys/class/graphics/fb0/format_3d", 0);
break;
case RENDER_STEREO_MODE_SPLIT_VERTICAL:
SysfsUtils::SetInt("/sys/class/graphics/fb0/format_3d", 1);
break;
case RENDER_STEREO_MODE_SPLIT_HORIZONTAL:
SysfsUtils::SetInt("/sys/class/graphics/fb0/format_3d", 2);
break;
}
}
#endif
}

Expand Down

0 comments on commit 710167b

Please sign in to comment.