mirror of https://github.com/mgba-emu/mgba.git
Set thread priorities for time-critical threads
This commit is contained in:
parent
bd731e8266
commit
39b5396c0b
|
@ -44,7 +44,7 @@ void Display::startDrawing(const uint32_t* buffer, GBAThread* thread) {
|
||||||
doneCurrent();
|
doneCurrent();
|
||||||
context()->moveToThread(m_drawThread);
|
context()->moveToThread(m_drawThread);
|
||||||
connect(m_drawThread, SIGNAL(started()), m_painter, SLOT(start()));
|
connect(m_drawThread, SIGNAL(started()), m_painter, SLOT(start()));
|
||||||
m_drawThread->start();
|
m_drawThread->start(QThread::TimeCriticalPriority);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Display::stopDrawing() {
|
void Display::stopDrawing() {
|
||||||
|
|
|
@ -72,7 +72,7 @@ GameController::GameController(QObject* parent)
|
||||||
controller->postLog(level, QString().vsprintf(format, args));
|
controller->postLog(level, QString().vsprintf(format, args));
|
||||||
};
|
};
|
||||||
|
|
||||||
m_audioThread->start();
|
m_audioThread->start(QThread::TimeCriticalPriority);
|
||||||
m_audioProcessor->moveToThread(m_audioThread);
|
m_audioProcessor->moveToThread(m_audioThread);
|
||||||
connect(this, SIGNAL(gameStarted(GBAThread*)), m_audioProcessor, SLOT(start()));
|
connect(this, SIGNAL(gameStarted(GBAThread*)), m_audioProcessor, SLOT(start()));
|
||||||
connect(this, SIGNAL(gameStopped(GBAThread*)), m_audioProcessor, SLOT(pause()));
|
connect(this, SIGNAL(gameStopped(GBAThread*)), m_audioProcessor, SLOT(pause()));
|
||||||
|
|
Loading…
Reference in New Issue