diff options
Diffstat (limited to 'src/managers/FrameSchedulingManager.cpp')
-rw-r--r-- | src/managers/FrameSchedulingManager.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/managers/FrameSchedulingManager.cpp b/src/managers/FrameSchedulingManager.cpp index 2d02f82f..fd86a37b 100644 --- a/src/managers/FrameSchedulingManager.cpp +++ b/src/managers/FrameSchedulingManager.cpp @@ -4,7 +4,7 @@ #include "eventLoop/EventLoopManager.hpp" static void onPresentTimer(std::shared_ptr<CEventLoopTimer> self, void* data) { - g_pFrameSchedulingManager->onVblankTimer(data); + g_pFrameSchedulingManager->onVblankTimer((CMonitor*)data); } static void onFenceTimer(std::shared_ptr<CEventLoopTimer> self, void* data) { @@ -41,7 +41,7 @@ void CFrameSchedulingManager::registerMonitor(CMonitor* pMonitor) { #endif DATA->fenceTimer = std::make_shared<CEventLoopTimer>(::onFenceTimer, pMonitor); - DATA->vblankTimer = std::make_shared<CEventLoopTimer>(::onPresentTimer, DATA); + DATA->vblankTimer = std::make_shared<CEventLoopTimer>(::onPresentTimer, pMonitor); g_pEventLoopManager->addTimer(DATA->fenceTimer); g_pEventLoopManager->addTimer(DATA->vblankTimer); @@ -252,8 +252,10 @@ void CFrameSchedulingManager::renderMonitor(SSchedulingData* data) { data->rendered = true; } -void CFrameSchedulingManager::onVblankTimer(void* data) { - auto DATA = (SSchedulingData*)data; +void CFrameSchedulingManager::onVblankTimer(CMonitor* pMonitor) { + const auto DATA = dataFor(pMonitor); + + RASSERT(DATA, "No data in onVblankTimer"); if (!DATA->rendered) { // what the fuck? |