qmlfrontend/runqueue.cpp
changeset 14175 8354b390f1a2
parent 14174 b273b43b16d2
child 14176 8f82d87d223f
--- a/qmlfrontend/runqueue.cpp	Wed Nov 07 15:55:32 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-#include "runqueue.h"
-
-#include "flib.h"
-
-extern "C" {
-extern RunEngine_t* flibRunEngine;
-extern ipcToEngineRaw_t* flibIpcToEngineRaw;
-extern ipcSetEngineBarrier_t* flibIpcSetEngineBarrier;
-extern ipcRemoveBarrierFromEngineQueue_t* flibIpcRemoveBarrierFromEngineQueue;
-}
-
-RunQueue::RunQueue(QObject* parent)
-    : QObject(parent)
-{
-}
-
-void RunQueue::queue(const GameConfig& config)
-{
-    m_runQueue.prepend(config);
-
-    flibIpcSetEngineBarrier();
-    for (const QByteArray& b : m_runQueue.last().config()) {
-        flibIpcToEngineRaw(b.data(), b.size());
-    }
-
-    if (m_runQueue.size() == 1)
-        nextRun();
-}
-
-void RunQueue::onGameFinished()
-{
-    m_runQueue.pop_front();
-
-    nextRun();
-}
-
-void RunQueue::nextRun()
-{
-    if (!m_runQueue.isEmpty()) {
-        if (m_runQueue[0].isPreview())
-            emit previewIsRendering();
-
-        flibIpcRemoveBarrierFromEngineQueue();
-
-        flibRunEngine(m_runQueue[0].argc(), m_runQueue[0].argv());
-    }
-}