Skip to content

Commit

Permalink
MythEDID: Use uint16_t for physical address
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-kendall committed Dec 27, 2019
1 parent f15b4f0 commit c56afe9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythedid.cpp
Expand Up @@ -37,7 +37,7 @@ QStringList MythEDID::SerialNumbers(void)
return m_serialNumbers;
}

int MythEDID::PhysicalAddress(void)
uint16_t MythEDID::PhysicalAddress(void)
{
return m_physicalAddress;
}
Expand Down Expand Up @@ -275,7 +275,7 @@ bool MythEDID::ParseVSDB(const quint8 *Data, uint Offset, uint Length)
break;

// CEC physical address
m_physicalAddress = (Data[Offset + 3] << 8) + Data[Offset + 4];
m_physicalAddress = static_cast<uint16_t>((Data[Offset + 3] << 8) + Data[Offset + 4]);
if (Length < 8 || (Offset + 8 >= m_size))
break;

Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythui/mythedid.h
Expand Up @@ -24,7 +24,7 @@ class MUI_PUBLIC MythEDID

bool Valid (void);
QStringList SerialNumbers (void);
int PhysicalAddress (void);
uint16_t PhysicalAddress (void);
float Gamma (void);
bool IsSRGB (void);
Primaries ColourPrimaries (void);
Expand All @@ -47,7 +47,7 @@ class MUI_PUBLIC MythEDID
float m_gamma { 0.0F }; // Invalid
bool m_sRGB { false };
Primaries m_primaries { {{0.0F, 0.0F}, {0.0F, 0.0F}, {0.0F, 0.0F}}, {0.0F, 0.0F} };
int m_physicalAddress { 0 };
uint16_t m_physicalAddress { 0 };
bool m_latencies { false };
bool m_interLatencies { false };
int m_audioLatency[2] { 0 };
Expand Down
4 changes: 1 addition & 3 deletions mythtv/libs/libmythui/platforms/mythdrmdevice.cpp
Expand Up @@ -187,9 +187,7 @@ bool MythDRMDevice::Initialise(void)
break;
}
if (!edid.Valid())
{
LOG(VB_GENERAL, m_verbose, LOC + "Connected device has invalid EDID");
}
LOG(VB_GENERAL, m_verbose, LOC + "Connected device has invalid EDID");
drmModeFreePropertyBlob(edidblob);
if (m_connector && !m_serialNumber.isEmpty())
break;
Expand Down

0 comments on commit c56afe9

Please sign in to comment.