Skip to content

Commit

Permalink
Fix flickering
Browse files Browse the repository at this point in the history
  • Loading branch information
SirLynix committed May 12, 2020
1 parent f2f5e26 commit 6505dd2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/obs-kinect/KinectSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,18 +166,22 @@ void KinectSource::Update(float /*seconds*/)
}
};

m_height = 0;
m_width = 0;
if (!m_deviceAccess)
{
m_height = 0;
m_width = 0;
return;
}

try
{
if (!m_deviceAccess)
return;

auto frameData = m_deviceAccess->GetLastFrame();
if (!frameData || frameData->frameIndex == m_lastFrameIndex)
return;

m_height = 0;
m_width = 0;

m_lastFrameIndex = frameData->frameIndex;

ObsGraphics obsGfx;
Expand Down

0 comments on commit 6505dd2

Please sign in to comment.