mirror of https://github.com/mgba-emu/mgba.git
Qt: Post empty frames if frameskipping
This commit is contained in:
parent
e11d34d761
commit
d4ab0564eb
|
@ -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) {
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue