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();
|
||||
context()->moveToThread(m_drawThread);
|
||||
connect(m_drawThread, SIGNAL(started()), m_painter, SLOT(start()));
|
||||
m_drawThread->start();
|
||||
m_drawThread->start(QThread::TimeCriticalPriority);
|
||||
}
|
||||
|
||||
void Display::stopDrawing() {
|
||||
|
|
|
@ -72,7 +72,7 @@ GameController::GameController(QObject* parent)
|
|||
controller->postLog(level, QString().vsprintf(format, args));
|
||||
};
|
||||
|
||||
m_audioThread->start();
|
||||
m_audioThread->start(QThread::TimeCriticalPriority);
|
||||
m_audioProcessor->moveToThread(m_audioThread);
|
||||
connect(this, SIGNAL(gameStarted(GBAThread*)), m_audioProcessor, SLOT(start()));
|
||||
connect(this, SIGNAL(gameStopped(GBAThread*)), m_audioProcessor, SLOT(pause()));
|
||||
|
|
Loading…
Reference in New Issue