MythTV  master
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MythGSync Class Reference

A wrapper around NVidia GSync support (when using X11 and a Display Port connection). More...

#include <mythnvcontrol.h>

Inheritance diagram for MythGSync:
Inheritance graph
[legend]
Collaboration diagram for MythGSync:
Collaboration graph
[legend]

Public Member Functions

 ~MythGSync () override
 
void SetEnabled (bool Enable=true) override
 
- Public Member Functions inherited from MythVRR
virtual ~MythVRR ()=default
 
QString TypeToString () const
 
bool Enabled () const
 
MythVRRRange GetRange () const
 
QString RangeDescription () const
 
bool IsControllable () const
 

Static Public Member Functions

static void ForceGSync (bool Enable)
 Enable or disable GSync before the main window is created. More...
 
static MythVRRPtr CreateGSync (const NVControl &Device, MythVRRRange Range)
 
- Static Public Member Functions inherited from MythVRR
static MythVRRPtr Create (class MythDisplay *MDisplay)
 Create a concrete implementation of MythVRR suitable for the given Display. More...
 

Static Public Attributes

static bool s_gsyncResetOnExit = false
 
static bool s_gsyncDefaultValue = false
 

Protected Member Functions

 MythGSync (NVControl Device, VRRType Type, bool Enabled, MythVRRRange Range)
 
- Protected Member Functions inherited from MythVRR
 MythVRR (bool Controllable, VRRType Type, bool Enabled, MythVRRRange Range)
 

Protected Attributes

NVControl m_nvControl { nullptr }
 
- Protected Attributes inherited from MythVRR
bool m_controllable { false }
 
VRRType m_type { Unknown }
 
bool m_enabled { false }
 
MythVRRRange m_range { 0, 0, false }
 

Additional Inherited Members

- Public Types inherited from MythVRR
enum  VRRType { Unknown = 0, FreeSync, GSync, GSyncCompat }
 

Detailed Description

A wrapper around NVidia GSync support (when using X11 and a Display Port connection).

If libXNVCtrl support is available through the MythNVControl class, then we can check for GSync capabilities and state. Note however that any changes requested to the GSync state will have no effect while the current GUI is running; so if we want to enable/disable GSync it must be done before we create the main window (and we can revert that state on exit).

See also
MythVRR
MythNVControl

Definition at line 23 of file mythnvcontrol.h.

Constructor & Destructor Documentation

◆ ~MythGSync()

MythGSync::~MythGSync ( )
override

Definition at line 109 of file mythnvcontrol.cpp.

◆ MythGSync()

MythGSync::MythGSync ( NVControl  Device,
VRRType  Type,
bool  Enabled,
MythVRRRange  Range 
)
protected

Definition at line 103 of file mythnvcontrol.cpp.

Referenced by CreateGSync().

Member Function Documentation

◆ ForceGSync()

void MythGSync::ForceGSync ( bool  Enable)
static

Enable or disable GSync before the main window is created.

If the state has been changed, s_gsyncResetOnExit will be set to true and s_gsyncDefaultValue will be set to the default/desktop value so that the MythDisplay instance can reset GSync on exit.

Definition at line 27 of file mythnvcontrol.cpp.

Referenced by MythDisplay::ConfigureQtGUI().

◆ CreateGSync()

MythVRRPtr MythGSync::CreateGSync ( const NVControl Device,
MythVRRRange  Range 
)
static

Definition at line 54 of file mythnvcontrol.cpp.

Referenced by MythVRR::Create(), and ForceGSync().

◆ SetEnabled()

void MythGSync::SetEnabled ( bool  Enable = true)
overridevirtual

Implements MythVRR.

Definition at line 119 of file mythnvcontrol.cpp.

Referenced by ~MythGSync().

Member Data Documentation

◆ s_gsyncResetOnExit

bool MythGSync::s_gsyncResetOnExit = false
inlinestatic

Definition at line 26 of file mythnvcontrol.h.

Referenced by MythDisplay::ConfigureQtGUI(), ForceGSync(), and ~MythGSync().

◆ s_gsyncDefaultValue

bool MythGSync::s_gsyncDefaultValue = false
inlinestatic

Definition at line 27 of file mythnvcontrol.h.

Referenced by ForceGSync(), and ~MythGSync().

◆ m_nvControl

NVControl MythGSync::m_nvControl { nullptr }
protected

Definition at line 35 of file mythnvcontrol.h.

Referenced by SetEnabled().


The documentation for this class was generated from the following files: