hedgewars/uFLRunQueue.pas
branchqmlfrontend
changeset 11464 30397f91571c
parent 11461 ab77e2ea2f82
child 11465 9f2fb0031ef0
--- a/hedgewars/uFLRunQueue.pas	Wed Dec 16 00:20:56 2015 +0300
+++ b/hedgewars/uFLRunQueue.pas	Thu Dec 17 00:51:20 2015 +0300
@@ -14,13 +14,12 @@
 begin
     if runQueue <> nil then
     begin
+    writeln('RUNNING ', runQueue^.gameType);
         if runQueue^.gameType = gtPreview then
             sendUI(mtRenderingPreview, nil, 0);
 
         ipcRemoveBarrierFromEngineQueue();
         RunEngine(runQueue^.argumentsNumber, @runQueue^.argv);
-
-        sendConfig(runQueue)
     end
 end;
 
@@ -36,8 +35,7 @@
 var pConfig, t, tt: PGameConfig;
     i: Longword;
 begin
-    ipcSetEngineBarrier();
-
+    writeln('QUEUE EXECUTION ', config.gameType);
     new(pConfig);
     pConfig^:= config;
 
@@ -59,13 +57,15 @@
     begin
         runQueue:= pConfig;
 
+        ipcSetEngineBarrier();
+        sendConfig(pConfig);
         nextRun
     end else
     begin
         t:= runQueue;
         while t^.nextConfig <> nil do 
         begin
-            if (pConfig^.gameType = gtPreview) and (t^.nextConfig^.gameType = gtPreview) then
+            if false and (pConfig^.gameType = gtPreview) and (t^.nextConfig^.gameType = gtPreview) and (t <> runQueue) then
             begin
                 tt:= t^.nextConfig;
                 pConfig^.nextConfig:= tt^.nextConfig;
@@ -75,6 +75,9 @@
             end;
             t:= t^.nextConfig;
         end;
+
+        ipcSetEngineBarrier();
+        sendConfig(pConfig);
         t^.nextConfig:= pConfig
     end;
 end;