MythTV  master
mythdisplaydrm.cpp
Go to the documentation of this file.
1 // MythTV
2 #include "mythdrmdevice.h"
3 #include "mythdisplaydrm.h"
4 
5 #define LOC QString("DispDRM: ")
6 
8  : MythDisplay()
9 {
11  if (!m_device->IsValid())
12  {
13  delete m_device;
14  m_device = nullptr;
15  }
16  Initialise();
17 }
18 
20 {
21  delete m_device;
22 }
23 
24 void MythDisplayDRM::ScreenChanged(QScreen *qScreen)
25 {
27 
28  if (m_device && m_device->GetScreen() != m_screen)
29  {
30  delete m_device;
31  m_device = nullptr;
32  }
33 
34  if (!m_device)
35  {
37  if (!m_device->IsValid())
38  {
39  delete m_device;
40  m_device = nullptr;
41  }
42  }
43 }
44 
46 {
47  if (m_device)
48  {
52  m_edid = m_device->GetEDID();
53  m_modeComplete = true;
54  return;
55  }
57 }
MythEDID GetEDID(void)
virtual void UpdateCurrentMode(void)
Retrieve screen details.
QScreen * m_screen
Definition: mythdisplay.h:91
bool IsValid(void) const
void UpdateCurrentMode(void) override
Retrieve screen details.
MythEDID m_edid
Definition: mythdisplay.h:88
QSize m_resolution
Definition: mythdisplay.h:86
void Initialise(void)
QSize GetPhysicalSize(void) const
void ScreenChanged(QScreen *qScreen) override
QScreen * GetScreen(void) const
MythDRMDevice * m_device
~MythDisplayDRM() override
bool m_modeComplete
Definition: mythdisplay.h:83
double GetRefreshRate(void) const
QSize GetResolution(void) const
QSize m_physicalSize
Definition: mythdisplay.h:87
double m_refreshRate
Definition: mythdisplay.h:84
virtual void ScreenChanged(QScreen *qScreen)
The actual screen in use has changed. We must use it.