Skip to content

Loading…

Player capability flags #1474

Merged
merged 6 commits into from

3 participants

@theuni
Team Kodi member

As discussed at devcon.

This makes sure that we do not show settings that the player is not capable of handling.

For audio and subtitles, they're defined by the player.

For video (stretching, brightness, contrast, etc) they're handled by the renderer. The exception is bypass mode, where the player actually handles the display itself. If this is the case, the player is queried from the renderer.

ping @huceke you'll need to do this for omxplayer as well: b90a3e3a31526f56e3277bed088397ed1cd547fb

@elupus
Team Kodi member
@theuni
Team Kodi member

@elupus switched to references. went ahead and squashed it down since there was no other code discussion.

@theuni theuni merged commit 056c785 into xbmc:master
@theuni
Team Kodi member

ping @huceke . Reminder to fill these in for rpi :)

@huceke

@theuni: quite late. not sure if i'll get it added in this merge window.

@cptspiff: is it ok when i add the caps to omxplayer till the weekend.

@ghost

that would be acceptable.

@LongChair LongChair added a commit to plexinc/plex-home-theater-public that referenced this pull request
@LongChair LongChair Remove ffmpeg avio option, fixes #1474 b61fbb0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
View
45 xbmc/cores/IPlayer.h
@@ -71,6 +71,24 @@ class CPlayerOptions
class CFileItem;
class CRect;
+enum IPlayerAudioCapabilities
+{
+ IPC_AUD_ALL,
+ IPC_AUD_OFFSET,
+ IPC_AUD_AMP,
+ IPC_AUD_SELECT_STREAM,
+ IPC_AUD_OUTPUT_STEREO,
+ IPC_AUD_SELECT_OUTPUT
+};
+
+enum IPlayerSubtitleCapabilities
+{
+ IPC_SUBS_ALL,
+ IPC_SUBS_SELECT,
+ IPC_SUBS_EXTERNAL,
+ IPC_SUBS_OFFSET
+};
+
class IPlayer
{
public:
@@ -181,6 +199,33 @@ class IPlayer
virtual CStdString GetPlayingTitle() { return ""; };
virtual bool SwitchChannel(const PVR::CPVRChannel &channel) { return false; }
+
+ /*!
+ \brief If the player uses bypass mode, define its rendering capabilities
+ */
+ virtual void GetRenderFeatures(std::vector<int> &renderFeatures) {};
+ /*!
+ \brief If the player uses bypass mode, define its deinterlace algorithms
+ */
+ virtual void GetDeinterlaceMethods(std::vector<int> &deinterlaceMethods) {};
+ /*!
+ \brief If the player uses bypass mode, define how deinterlace is set
+ */
+ virtual void GetDeinterlaceModes(std::vector<int> &deinterlaceModes) {};
+ /*!
+ \brief If the player uses bypass mode, define its scaling capabilities
+ */
+ virtual void GetScalingMethods(std::vector<int> &scalingMethods) {};
+ /*!
+ \brief define the audio capabilities of the player (default=all)
+ */
+
+ virtual void GetAudioCapabilities(std::vector<int> &audioCaps) { audioCaps.assign(1,IPC_AUD_ALL); };
+ /*!
+ \brief define the subtitle capabilities of the player
+ */
+ virtual void GetSubtitleCapabilities(std::vector<int> &subCaps) { subCaps.assign(1,IPC_SUBS_ALL); };
+
protected:
IPlayerCallback& m_callback;
};
View
8 xbmc/cores/VideoRenderers/BaseRenderer.h
@@ -56,7 +56,13 @@ enum ERENDERFEATURE
RENDERFEATURE_NOISE,
RENDERFEATURE_SHARPNESS,
RENDERFEATURE_NONLINSTRETCH,
- RENDERFEATURE_ROTATION
+ RENDERFEATURE_ROTATION,
+ RENDERFEATURE_STRETCH,
+ RENDERFEATURE_CROP,
+ RENDERFEATURE_ZOOM,
+ RENDERFEATURE_VERTICAL_SHIFT,
+ RENDERFEATURE_PIXEL_RATIO,
+ RENDERFEATURE_POSTPROCESS
};
typedef void (*RenderUpdateCallBackFn)(const void *ctx, const CRect &SrcRect, const CRect &DestRect);
View
8 xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
@@ -3201,7 +3201,13 @@ bool CLinuxRendererGL::Supports(ERENDERFEATURE feature)
return true;
}
- if (feature == RENDERFEATURE_ROTATION)
+ if (feature == RENDERFEATURE_STRETCH ||
+ feature == RENDERFEATURE_CROP ||
+ feature == RENDERFEATURE_ZOOM ||
+ feature == RENDERFEATURE_VERTICAL_SHIFT ||
+ feature == RENDERFEATURE_PIXEL_RATIO ||
+ feature == RENDERFEATURE_POSTPROCESS ||
+ feature == RENDERFEATURE_ROTATION)
return true;
return false;
View
54 xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
@@ -46,6 +46,7 @@
#include "threads/SingleLock.h"
#include "RenderCapture.h"
#include "RenderFormats.h"
+#include "xbmc/Application.h"
#if defined(__ARM_NEON__)
#include "yuv2rgb.neon.h"
@@ -190,6 +191,13 @@ bool CLinuxRendererGLES::Configure(unsigned int width, unsigned int height, unsi
m_RenderUpdateCallBackFn = NULL;
m_RenderUpdateCallBackCtx = NULL;
+ if ((m_format == RENDER_FMT_BYPASS) && g_application.GetCurrentPlayer())
+ {
+ g_application.m_pPlayer->GetRenderFeatures(m_renderFeatures);
+ g_application.m_pPlayer->GetDeinterlaceMethods(m_deinterlaceMethods);
+ g_application.m_pPlayer->GetDeinterlaceModes(m_deinterlaceModes);
+ g_application.m_pPlayer->GetScalingMethods(m_scalingMethods);
+ }
return true;
}
@@ -1818,6 +1826,13 @@ void CLinuxRendererGLES::SetTextureFilter(GLenum method)
bool CLinuxRendererGLES::Supports(ERENDERFEATURE feature)
{
+ // Player controls render, let it dictate available render features
+ if((m_renderMethod & RENDER_BYPASS))
+ {
+ Features::iterator itr = std::find(m_renderFeatures.begin(),m_renderFeatures.end(), feature);
+ return itr != m_renderFeatures.end();
+ }
+
if(feature == RENDERFEATURE_BRIGHTNESS)
return false;
@@ -1836,9 +1851,16 @@ bool CLinuxRendererGLES::Supports(ERENDERFEATURE feature)
if (feature == RENDERFEATURE_NONLINSTRETCH)
return false;
- if (feature == RENDERFEATURE_ROTATION)
+ if (feature == RENDERFEATURE_STRETCH ||
+ feature == RENDERFEATURE_CROP ||
+ feature == RENDERFEATURE_ZOOM ||
+ feature == RENDERFEATURE_VERTICAL_SHIFT ||
+ feature == RENDERFEATURE_PIXEL_RATIO ||
+ feature == RENDERFEATURE_POSTPROCESS ||
+ feature == RENDERFEATURE_ROTATION)
return true;
+
return false;
}
@@ -1849,6 +1871,13 @@ bool CLinuxRendererGLES::SupportsMultiPassRendering()
bool CLinuxRendererGLES::Supports(EDEINTERLACEMODE mode)
{
+ // Player controls render, let it dictate available deinterlace modes
+ if((m_renderMethod & RENDER_BYPASS))
+ {
+ Features::iterator itr = std::find(m_deinterlaceModes.begin(),m_deinterlaceModes.end(), mode);
+ return itr != m_deinterlaceModes.end();
+ }
+
if (mode == VS_DEINTERLACEMODE_OFF)
return true;
@@ -1867,6 +1896,13 @@ bool CLinuxRendererGLES::Supports(EDEINTERLACEMODE mode)
bool CLinuxRendererGLES::Supports(EINTERLACEMETHOD method)
{
+ // Player controls render, let it dictate available deinterlace methods
+ if((m_renderMethod & RENDER_BYPASS))
+ {
+ Features::iterator itr = std::find(m_deinterlaceMethods.begin(),m_deinterlaceMethods.end(), method);
+ return itr != m_deinterlaceMethods.end();
+ }
+
if(m_renderMethod & RENDER_OMXEGL)
return false;
@@ -1890,6 +1926,13 @@ bool CLinuxRendererGLES::Supports(EINTERLACEMETHOD method)
bool CLinuxRendererGLES::Supports(ESCALINGMETHOD method)
{
+ // Player controls render, let it dictate available scaling methods
+ if((m_renderMethod & RENDER_BYPASS))
+ {
+ Features::iterator itr = std::find(m_scalingMethods.begin(),m_scalingMethods.end(), method);
+ return itr != m_scalingMethods.end();
+ }
+
if(method == VS_SCALINGMETHOD_NEAREST
|| method == VS_SCALINGMETHOD_LINEAR)
return true;
@@ -1899,6 +1942,15 @@ bool CLinuxRendererGLES::Supports(ESCALINGMETHOD method)
EINTERLACEMETHOD CLinuxRendererGLES::AutoInterlaceMethod()
{
+ // Player controls render, let it pick the auto-deinterlace method
+ if((m_renderMethod & RENDER_BYPASS))
+ {
+ if (m_deinterlaceMethods.size())
+ return ((EINTERLACEMETHOD)m_deinterlaceMethods[0]);
+ else
+ return VS_INTERLACEMETHOD_NONE;
+ }
+
if(m_renderMethod & RENDER_OMXEGL)
return VS_INTERLACEMETHOD_NONE;
View
6 xbmc/cores/VideoRenderers/LinuxRendererGLES.h
@@ -39,6 +39,7 @@ class CBaseTexture;
namespace Shaders { class BaseYUV2RGBShader; }
namespace Shaders { class BaseVideoFilterShader; }
class COpenMaxVideo;
+typedef std::vector<int> Features;
#define NUM_BUFFERS 3
@@ -266,6 +267,11 @@ class CLinuxRendererGLES : public CBaseRenderer
ESCALINGMETHOD m_scalingMethod;
ESCALINGMETHOD m_scalingMethodGui;
+ Features m_renderFeatures;
+ Features m_deinterlaceMethods;
+ Features m_deinterlaceModes;
+ Features m_scalingMethods;
+
// clear colour for "black" bars
float m_clearColour;
View
10 xbmc/cores/VideoRenderers/WinRenderer.cpp
@@ -1036,6 +1036,16 @@ bool CWinRenderer::Supports(ERENDERFEATURE feature)
if(feature == RENDERFEATURE_CONTRAST)
return true;
+ if (feature == RENDERFEATURE_STRETCH ||
+ feature == RENDERFEATURE_NONLINSTRETCH ||
+ feature == RENDERFEATURE_CROP ||
+ feature == RENDERFEATURE_ZOOM ||
+ feature == RENDERFEATURE_VERTICAL_SHIFT ||
+ feature == RENDERFEATURE_PIXEL_RATIO ||
+ feature == RENDERFEATURE_POSTPROCESS)
+ return true;
+
+
return false;
}
View
40 xbmc/cores/amlplayer/AMLPlayer.cpp
@@ -52,6 +52,7 @@
#include "xbmc/cores/dvdplayer/DVDClock.h"
#include "xbmc/cores/dvdplayer/DVDPlayerSubtitle.h"
#include "xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxVobsub.h"
+#include "settings/VideoSettings.h"
// amlogic libplayer
#include "DllLibamplayer.h"
@@ -2313,3 +2314,42 @@ void CAMLPlayer::RenderUpdateCallBack(const void *ctx, const CRect &SrcRect, con
CAMLPlayer *player = (CAMLPlayer*)ctx;
player->SetVideoRect(SrcRect, DestRect);
}
+
+void CAMLPlayer::GetRenderFeatures(std::vector<int> &renderFeatures)
+{
+ renderFeatures.push_back(RENDERFEATURE_ZOOM);
+ renderFeatures.push_back(RENDERFEATURE_CONTRAST);
+ renderFeatures.push_back(RENDERFEATURE_BRIGHTNESS);
+ renderFeatures.push_back(RENDERFEATURE_STRETCH);
+}
+
+void CAMLPlayer::GetDeinterlaceMethods(std::vector<int> &deinterlaceMethods)
+{
+ deinterlaceMethods.push_back(VS_INTERLACEMETHOD_DEINTERLACE);
+}
+
+void CAMLPlayer::GetDeinterlaceModes(std::vector<int> &deinterlaceModes)
+{
+ deinterlaceModes.push_back(VS_DEINTERLACEMODE_AUTO);
+}
+
+void CAMLPlayer::GetScalingMethods(std::vector<int> &scalingMethods)
+{
+}
+
+void CAMLPlayer::GetAudioCapabilities(std::vector<int> &audioCaps)
+{
+ audioCaps.push_back(IPC_AUD_SELECT_STREAM);
+ audioCaps.push_back(IPC_AUD_SELECT_OUTPUT);
+#if !defined(TARGET_ANDROID)
+ audioCaps.push_back(IPC_AUD_OFFSET);
+#endif
+}
+
+void CAMLPlayer::GetSubtitleCapabilities(std::vector<int> &subCaps)
+{
+ subCaps.push_back(IPC_SUBS_EXTERNAL);
+ subCaps.push_back(IPC_SUBS_SELECT);
+ subCaps.push_back(IPC_SUBS_OFFSET);
+}
+
View
7 xbmc/cores/amlplayer/AMLPlayer.h
@@ -165,6 +165,13 @@ class CAMLPlayer : public IPlayer, public CThread
virtual void GetSubtitleCapabilities(Features* subCaps);
*/
+ virtual void GetRenderFeatures(std::vector<int> &renderFeatures);
+ virtual void GetDeinterlaceMethods(std::vector<int> &deinterlaceMethods);
+ virtual void GetDeinterlaceModes(std::vector<int> &deinterlaceModes);
+ virtual void GetScalingMethods(std::vector<int> &scalingMethods);
+ virtual void GetAudioCapabilities(std::vector<int> &audioCaps);
+ virtual void GetSubtitleCapabilities(std::vector<int> &subCaps);
+
protected:
virtual void OnStartup();
virtual void OnExit();
View
49 xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp
@@ -73,33 +73,47 @@ void CGUIDialogAudioSubtitleSettings::CreateSettings()
{
m_usePopupSliders = g_SkinInfo->HasSkinFile("DialogSlider.xml");
+ if (g_application.m_pPlayer)
+ {
+ g_application.m_pPlayer->GetAudioCapabilities(m_audioCaps);
+ g_application.m_pPlayer->GetSubtitleCapabilities(m_subCaps);
+ }
+
// clear out any old settings
m_settings.clear();
// create our settings
m_volume = g_settings.m_fVolumeLevel;
AddSlider(AUDIO_SETTINGS_VOLUME, 13376, &m_volume, VOLUME_MINIMUM, VOLUME_MAXIMUM / 100.0f, VOLUME_MAXIMUM, PercentAsDecibel, false);
- AddSlider(AUDIO_SETTINGS_VOLUME_AMPLIFICATION, 660, &g_settings.m_currentVideoSettings.m_VolumeAmplification, VOLUME_DRC_MINIMUM * 0.01f, (VOLUME_DRC_MAXIMUM - VOLUME_DRC_MINIMUM) / 6000.0f, VOLUME_DRC_MAXIMUM * 0.01f, FormatDecibel, false);
+ if (SupportsAudioFeature(IPC_AUD_AMP))
+ AddSlider(AUDIO_SETTINGS_VOLUME_AMPLIFICATION, 660, &g_settings.m_currentVideoSettings.m_VolumeAmplification, VOLUME_DRC_MINIMUM * 0.01f, (VOLUME_DRC_MAXIMUM - VOLUME_DRC_MINIMUM) / 6000.0f, VOLUME_DRC_MAXIMUM * 0.01f, FormatDecibel, false);
if (g_application.m_pPlayer && g_application.m_pPlayer->IsPassthrough())
{
EnableSettings(AUDIO_SETTINGS_VOLUME,false);
EnableSettings(AUDIO_SETTINGS_VOLUME_AMPLIFICATION,false);
}
- AddSlider(AUDIO_SETTINGS_DELAY, 297, &g_settings.m_currentVideoSettings.m_AudioDelay, -g_advancedSettings.m_videoAudioDelayRange, .025f, g_advancedSettings.m_videoAudioDelayRange, FormatDelay);
- AddAudioStreams(AUDIO_SETTINGS_STREAM);
+ if (SupportsAudioFeature(IPC_AUD_OFFSET))
+ AddSlider(AUDIO_SETTINGS_DELAY, 297, &g_settings.m_currentVideoSettings.m_AudioDelay, -g_advancedSettings.m_videoAudioDelayRange, .025f, g_advancedSettings.m_videoAudioDelayRange, FormatDelay);
+ if (SupportsAudioFeature(IPC_AUD_SELECT_STREAM))
+ AddAudioStreams(AUDIO_SETTINGS_STREAM);
// only show stuff available in digital mode if we have digital output
- AddBool(AUDIO_SETTINGS_OUTPUT_TO_ALL_SPEAKERS, 252, &g_settings.m_currentVideoSettings.m_OutputToAllSpeakers, AUDIO_IS_BITSTREAM(g_guiSettings.GetInt("audiooutput.mode")));
+ if (SupportsAudioFeature(IPC_AUD_OUTPUT_STEREO))
+ AddBool(AUDIO_SETTINGS_OUTPUT_TO_ALL_SPEAKERS, 252, &g_settings.m_currentVideoSettings.m_OutputToAllSpeakers, AUDIO_IS_BITSTREAM(g_guiSettings.GetInt("audiooutput.mode")));
int settings[3] = { 338, 339, 420 }; //ANALOG, IEC958, HDMI
m_outputmode = g_guiSettings.GetInt("audiooutput.mode");
- AddSpin(AUDIO_SETTINGS_DIGITAL_ANALOG, 337, &m_outputmode, 3, settings);
+ if (SupportsAudioFeature(IPC_AUD_SELECT_OUTPUT))
+ AddSpin(AUDIO_SETTINGS_DIGITAL_ANALOG, 337, &m_outputmode, 3, settings);
AddSeparator(7);
m_subtitleVisible = g_application.m_pPlayer->GetSubtitleVisible();
AddBool(SUBTITLE_SETTINGS_ENABLE, 13397, &m_subtitleVisible);
- AddSlider(SUBTITLE_SETTINGS_DELAY, 22006, &g_settings.m_currentVideoSettings.m_SubtitleDelay, -g_advancedSettings.m_videoSubsDelayRange, 0.1f, g_advancedSettings.m_videoSubsDelayRange, FormatDelay);
- AddSubtitleStreams(SUBTITLE_SETTINGS_STREAM);
- AddButton(SUBTITLE_SETTINGS_BROWSER,13250);
+ if (SupportsSubtitleFeature(IPC_SUBS_OFFSET))
+ AddSlider(SUBTITLE_SETTINGS_DELAY, 22006, &g_settings.m_currentVideoSettings.m_SubtitleDelay, -g_advancedSettings.m_videoSubsDelayRange, 0.1f, g_advancedSettings.m_videoSubsDelayRange, FormatDelay);
+ if (SupportsSubtitleFeature(IPC_SUBS_SELECT))
+ AddSubtitleStreams(SUBTITLE_SETTINGS_STREAM);
+ if (SupportsSubtitleFeature(IPC_SUBS_EXTERNAL))
+ AddButton(SUBTITLE_SETTINGS_BROWSER,13250);
AddButton(AUDIO_SETTINGS_MAKE_DEFAULT, 12376);
}
@@ -394,3 +408,22 @@ CStdString CGUIDialogAudioSubtitleSettings::FormatDelay(float value, float inter
return text;
}
+bool CGUIDialogAudioSubtitleSettings::SupportsAudioFeature(int feature)
+{
+ for (Features::iterator itr = m_audioCaps.begin(); itr != m_audioCaps.end(); itr++)
+ {
+ if(*itr == feature || *itr == IPC_AUD_ALL)
+ return true;
+ }
+ return false;
+}
+
+bool CGUIDialogAudioSubtitleSettings::SupportsSubtitleFeature(int feature)
+{
+ for (Features::iterator itr = m_subCaps.begin(); itr != m_subCaps.end(); itr++)
+ {
+ if(*itr == feature || *itr == IPC_SUBS_ALL)
+ return true;
+ }
+ return false;
+}
View
5 xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.h
@@ -21,6 +21,7 @@
*/
#include "settings/GUIDialogSettings.h"
+typedef std::vector<int> Features;
class CGUIDialogAudioSubtitleSettings :
public CGUIDialogSettings
@@ -40,10 +41,14 @@ class CGUIDialogAudioSubtitleSettings :
void AddAudioStreams(unsigned int id);
void AddSubtitleStreams(unsigned int id);
+ bool SupportsAudioFeature(int feature);
+ bool SupportsSubtitleFeature(int feature);
float m_volume;
int m_audioStream;
int m_subtitleStream;
int m_outputmode;
bool m_subtitleVisible;
+ Features m_audioCaps;
+ Features m_subCaps;
};
View
51 xbmc/video/dialogs/GUIDialogVideoSettings.cpp
@@ -76,24 +76,19 @@ void CGUIDialogVideoSettings::CreateSettings()
// create our settings
{
vector<pair<int, int> > entries;
- entries.push_back(make_pair(VS_DEINTERLACEMODE_OFF , 16039));
-#ifndef TARGET_RASPBERRY_PI
- entries.push_back(make_pair(VS_DEINTERLACEMODE_AUTO , 16040));
-#endif
- entries.push_back(make_pair(VS_DEINTERLACEMODE_FORCE , 16041));
- /* remove unsupported methods */
- for(vector<pair<int, int> >::iterator it = entries.begin(); it != entries.end();)
- {
- if(g_renderManager.Supports((EDEINTERLACEMODE)it->first))
- it++;
- else
- it = entries.erase(it);
- }
+ if (g_renderManager.Supports(VS_DEINTERLACEMODE_OFF))
+ entries.push_back(make_pair(VS_DEINTERLACEMODE_OFF , 16039));
+
+ if (g_renderManager.Supports(VS_DEINTERLACEMODE_AUTO))
+ entries.push_back(make_pair(VS_DEINTERLACEMODE_AUTO , 16040));
+
+ if (g_renderManager.Supports(VS_DEINTERLACEMODE_FORCE))
+ entries.push_back(make_pair(VS_DEINTERLACEMODE_FORCE , 16041));
- AddSpin(VIDEO_SETTINGS_DEINTERLACEMODE, 16037, (int*)&g_settings.m_currentVideoSettings.m_DeinterlaceMode, entries);
+ if (entries.size())
+ AddSpin(VIDEO_SETTINGS_DEINTERLACEMODE, 16037, (int*)&g_settings.m_currentVideoSettings.m_DeinterlaceMode, entries);
}
-#ifndef TARGET_RASPBERRY_PI
{
vector<pair<int, int> > entries;
entries.push_back(make_pair(VS_INTERLACEMETHOD_AUTO , 16019));
@@ -125,9 +120,12 @@ void CGUIDialogVideoSettings::CreateSettings()
it = entries.erase(it);
}
- AddSpin(VIDEO_SETTINGS_INTERLACEMETHOD, 16038, (int*)&g_settings.m_currentVideoSettings.m_InterlaceMethod, entries);
- if (g_settings.m_currentVideoSettings.m_DeinterlaceMode == VS_DEINTERLACEMODE_OFF)
- EnableSettings(VIDEO_SETTINGS_INTERLACEMETHOD, false);
+ if (entries.size() > 1)
+ {
+ AddSpin(VIDEO_SETTINGS_INTERLACEMETHOD, 16038, (int*)&g_settings.m_currentVideoSettings.m_InterlaceMethod, entries);
+ if (g_settings.m_currentVideoSettings.m_DeinterlaceMode == VS_DEINTERLACEMODE_OFF)
+ EnableSettings(VIDEO_SETTINGS_INTERLACEMETHOD, false);
+ }
}
{
vector<pair<int, int> > entries;
@@ -159,16 +157,21 @@ void CGUIDialogVideoSettings::CreateSettings()
AddSpin(VIDEO_SETTINGS_SCALINGMETHOD, 16300, (int*)&g_settings.m_currentVideoSettings.m_ScalingMethod, entries);
}
-#endif
- AddBool(VIDEO_SETTINGS_CROP, 644, &g_settings.m_currentVideoSettings.m_Crop);
+ if (g_renderManager.Supports(RENDERFEATURE_CROP))
+ AddBool(VIDEO_SETTINGS_CROP, 644, &g_settings.m_currentVideoSettings.m_Crop);
+ if (g_renderManager.Supports(RENDERFEATURE_STRETCH) || g_renderManager.Supports(RENDERFEATURE_PIXEL_RATIO))
{
const int entries[] = {630, 631, 632, 633, 634, 635, 636 };
AddSpin(VIDEO_SETTINGS_VIEW_MODE, 629, &g_settings.m_currentVideoSettings.m_ViewMode, 7, entries);
}
- AddSlider(VIDEO_SETTINGS_ZOOM, 216, &g_settings.m_currentVideoSettings.m_CustomZoomAmount, 0.5f, 0.01f, 2.0f, FormatFloat);
- AddSlider(VIDEO_SETTINGS_VERTICAL_SHIFT, 225, &g_settings.m_currentVideoSettings.m_CustomVerticalShift, -2.0f, 0.01f, 2.0f, FormatFloat);
- AddSlider(VIDEO_SETTINGS_PIXEL_RATIO, 217, &g_settings.m_currentVideoSettings.m_CustomPixelRatio, 0.5f, 0.01f, 2.0f, FormatFloat);
- AddBool(VIDEO_SETTINGS_POSTPROCESS, 16400, &g_settings.m_currentVideoSettings.m_PostProcess);
+ if (g_renderManager.Supports(RENDERFEATURE_ZOOM))
+ AddSlider(VIDEO_SETTINGS_ZOOM, 216, &g_settings.m_currentVideoSettings.m_CustomZoomAmount, 0.5f, 0.01f, 2.0f, FormatFloat);
+ if (g_renderManager.Supports(RENDERFEATURE_VERTICAL_SHIFT))
+ AddSlider(VIDEO_SETTINGS_VERTICAL_SHIFT, 225, &g_settings.m_currentVideoSettings.m_CustomVerticalShift, -2.0f, 0.01f, 2.0f, FormatFloat);
+ if (g_renderManager.Supports(RENDERFEATURE_PIXEL_RATIO))
+ AddSlider(VIDEO_SETTINGS_PIXEL_RATIO, 217, &g_settings.m_currentVideoSettings.m_CustomPixelRatio, 0.5f, 0.01f, 2.0f, FormatFloat);
+ if (g_renderManager.Supports(RENDERFEATURE_POSTPROCESS))
+ AddBool(VIDEO_SETTINGS_POSTPROCESS, 16400, &g_settings.m_currentVideoSettings.m_PostProcess);
#ifdef HAS_VIDEO_PLAYBACK
if (g_renderManager.Supports(RENDERFEATURE_BRIGHTNESS))
Something went wrong with that request. Please try again.