hedgewars/uFLRunQueue.pas
branchqmlfrontend
changeset 11456 6e9b12864856
parent 11439 23912c93935a
child 11457 78860824b5a5
equal deleted inserted replaced
11455:0c75fa9ce340 11456:6e9b12864856
     4 
     4 
     5 procedure queueExecution(var config: TGameConfig);
     5 procedure queueExecution(var config: TGameConfig);
     6 procedure passFlibEvent(p: pointer); cdecl;
     6 procedure passFlibEvent(p: pointer); cdecl;
     7 
     7 
     8 implementation
     8 implementation
     9 uses uFLGameConfig, hwengine, uFLData, uFLUICallback;
     9 uses uFLGameConfig, hwengine, uFLData, uFLUICallback, uFLIPC;
    10 
    10 
    11 var runQueue: PGameConfig = nil;
    11 var runQueue: PGameConfig = nil;
    12 
    12 
    13 procedure nextRun;
    13 procedure nextRun;
    14 begin
    14 begin
    15     if runQueue <> nil then
    15     if runQueue <> nil then
    16     begin
    16     begin
    17         if runQueue^.gameType = gtPreview then
    17         if runQueue^.gameType = gtPreview then
    18             sendUI(mtRenderingPreview, nil, 0);
    18             sendUI(mtRenderingPreview, nil, 0);
    19 
    19 
       
    20         ipcCleanEngineQueue();
    20         RunEngine(runQueue^.argumentsNumber, @runQueue^.argv);
    21         RunEngine(runQueue^.argumentsNumber, @runQueue^.argv);
    21 
    22 
    22         sendConfig(runQueue)
    23         sendConfig(runQueue)
    23     end
    24     end
    24 end;
    25 end;
    80 begin
    81 begin
    81     case TFLIBEvent(p^) of
    82     case TFLIBEvent(p^) of
    82         flibGameFinished: begin
    83         flibGameFinished: begin
    83                 cleanupConfig;
    84                 cleanupConfig;
    84                 nextRun
    85                 nextRun
    85                 end;
    86             end;
       
    87         flibRunNetGame: begin
       
    88                 runNetGame
       
    89             end;
    86     end;
    90     end;
    87 end;
    91 end;
    88 
    92 
    89 end.
    93 end.