Qt: Post empty frames if frameskipping

This commit is contained in:
Jeffrey Pfau 2015-04-18 03:49:24 -07:00
parent e11d34d761
commit d4ab0564eb
2 changed files with 8 additions and 2 deletions

View File

@ -114,7 +114,9 @@ void DisplayGL::filter(bool filter) {
} }
void DisplayGL::framePosted(const uint32_t* buffer) { void DisplayGL::framePosted(const uint32_t* buffer) {
if (buffer) {
m_painter->setBacking(buffer); m_painter->setBacking(buffer);
}
} }
void DisplayGL::resizeEvent(QResizeEvent* event) { void DisplayGL::resizeEvent(QResizeEvent* event) {

View File

@ -118,7 +118,11 @@ GameController::GameController(QObject* parent)
controller->gamePaused(&controller->m_threadContext); controller->gamePaused(&controller->m_threadContext);
} }
controller->m_pauseMutex.unlock(); controller->m_pauseMutex.unlock();
if (GBASyncDrawingFrame(&controller->m_threadContext.sync)) {
controller->frameAvailable(controller->m_drawContext); controller->frameAvailable(controller->m_drawContext);
} else {
controller->frameAvailable(nullptr);
}
}; };
m_threadContext.logHandler = [] (GBAThread* context, enum GBALogLevel level, const char* format, va_list args) { m_threadContext.logHandler = [] (GBAThread* context, enum GBALogLevel level, const char* format, va_list args) {