Set thread priorities for time-critical threads

This commit is contained in:
Jeffrey Pfau 2014-10-15 02:38:58 -07:00
parent bd731e8266
commit 39b5396c0b
2 changed files with 2 additions and 2 deletions

View File

@ -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() {

View File

@ -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()));