Skip to content

Commit

Permalink
squash: [RBP] Make vsync event persistant
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Mar 28, 2015
1 parent 2535a78 commit 0b9d799
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xbmc/linux/RBP.cpp
Expand Up @@ -186,17 +186,17 @@ static void vsync_callback(DISPMANX_UPDATE_HANDLE_T u, void *arg)
void CRBP::WaitVsync()
{
int s;
CEvent sync;
DISPMANX_DISPLAY_HANDLE_T m_display = vc_dispmanx_display_open( 0 /*screen*/ );
if (m_display == DISPMANX_NO_HANDLE)
{
CLog::Log(LOGDEBUG, "CRBP::%s skipping while display closed", __func__);
return;
}
s = vc_dispmanx_vsync_callback(m_display, vsync_callback, (void *)&sync);
m_vsync.Reset();
s = vc_dispmanx_vsync_callback(m_display, vsync_callback, (void *)&m_vsync);
if (s == 0)
{
sync.Wait();
m_vsync.Wait();
}
else assert(0);
s = vc_dispmanx_vsync_callback(m_display, NULL, NULL);
Expand Down
2 changes: 2 additions & 0 deletions xbmc/linux/RBP.h
Expand Up @@ -39,6 +39,7 @@
#include "OMXCore.h"
#include "xbmc/utils/CPUInfo.h"
#include "threads/CriticalSection.h"
#include "threads/Event.h"

class CRBP
{
Expand Down Expand Up @@ -81,6 +82,7 @@ class CRBP
class DllLibOMXCore;
CCriticalSection m_critSection;
DISPMANX_DISPLAY_HANDLE_T m_display;
CEvent m_vsync;
};

extern CRBP g_RBP;
Expand Down

0 comments on commit 0b9d799

Please sign in to comment.