Qt: Post empty frames if frameskipping
Jeffrey Pfau jeffrey@endrift.com
Sat, 18 Apr 2015 03:49:24 -0700
2 files changed,
8 insertions(+),
2 deletions(-)
M
src/platform/qt/DisplayGL.cpp
→
src/platform/qt/DisplayGL.cpp
@@ -114,7 +114,9 @@ }
} void DisplayGL::framePosted(const uint32_t* buffer) { - m_painter->setBacking(buffer); + if (buffer) { + m_painter->setBacking(buffer); + } } void DisplayGL::resizeEvent(QResizeEvent* event) {
M
src/platform/qt/GameController.cpp
→
src/platform/qt/GameController.cpp
@@ -118,7 +118,11 @@ controller->m_pauseAfterFrame = false;
controller->gamePaused(&controller->m_threadContext); } controller->m_pauseMutex.unlock(); - controller->frameAvailable(controller->m_drawContext); + if (GBASyncDrawingFrame(&controller->m_threadContext.sync)) { + controller->frameAvailable(controller->m_drawContext); + } else { + controller->frameAvailable(nullptr); + } }; m_threadContext.logHandler = [] (GBAThread* context, enum GBALogLevel level, const char* format, va_list args) {