udev thread join fix

This commit is contained in:
Jack Andersen
2015-11-12 16:11:32 -10:00
parent c9fd0fdbb5
commit 83475b4b09
2 changed files with 41 additions and 15 deletions

View File

@@ -341,6 +341,7 @@ public:
IGraphicsDataFactory* getLoadContextDataFactory()
{
XLockDisplay(m_xDisp);
if (!m_loadCtx)
{
m_loadCtx = glXCreateContextAttribsARB(m_xDisp, m_fbconfig, m_glxCtx, True, ContextAttribs);
@@ -349,6 +350,7 @@ public:
}
if (!glXMakeContextCurrent(m_xDisp, m_glxWindow, m_glxWindow, m_loadCtx))
Log.report(LogVisor::FatalError, "unable to make load GLX context current");
XUnlockDisplay(m_xDisp);
return getDataFactory();
}
@@ -362,8 +364,10 @@ public:
{
if (m_timerBound)
return;
XLockDisplay(m_xDisp);
if (!glXMakeContextCurrent(m_xDisp, m_glxWindow, m_glxWindow, m_timerCtx))
Log.report(LogVisor::FatalError, "unable to make timer GLX context current");
XUnlockDisplay(m_xDisp);
m_timerBound = true;
}