Skip to content

Commit

Permalink
MythVDPAUHelper: Suppress warning about opening X display
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-kendall committed Sep 30, 2019
1 parent 743c1ed commit 3512c2e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mythvdpauhelper.cpp
Expand Up @@ -75,7 +75,7 @@ static const char* DummyGetError(VdpStatus)
MythVDPAUHelper::MythVDPAUHelper(void)
: m_createdDevice(true)
{
m_display = OpenMythXDisplay();
m_display = OpenMythXDisplay(false);
if (!m_display)
return;

Expand Down
5 changes: 3 additions & 2 deletions mythtv/libs/libmythui/mythxdisplay.cpp
Expand Up @@ -56,13 +56,14 @@ MythXDisplay *GetMythXDisplay(Display *d)
return nullptr;
}

MythXDisplay *OpenMythXDisplay(void)
MythXDisplay *OpenMythXDisplay(bool Warn /*= true*/)
{
MythXDisplay *disp = new MythXDisplay();
if (disp && disp->Open())
return disp;

LOG(VB_GENERAL, LOG_CRIT, "MythXOpenDisplay() failed");
if (Warn)
LOG(VB_GENERAL, LOG_CRIT, "MythXOpenDisplay() failed");
delete disp;
return nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythxdisplay.h
Expand Up @@ -71,7 +71,7 @@ class MythXLocker

MUI_PUBLIC void LockMythXDisplays(bool lock);
MUI_PUBLIC MythXDisplay *GetMythXDisplay(Display*);
MUI_PUBLIC MythXDisplay *OpenMythXDisplay(void);
MUI_PUBLIC MythXDisplay *OpenMythXDisplay(bool Warn = true);
#define XLOCK(dpy, arg) { dpy->Lock(); arg; dpy->Unlock(); }
#endif // USING_X11

Expand Down

0 comments on commit 3512c2e

Please sign in to comment.