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

View File

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