hedgewars/uFLRunQueue.pas
branchqmlfrontend
changeset 12858 0c6fb706f747
parent 11460 9f2fb0031ef0
equal deleted inserted replaced
12857:90f927b4b9e1 12858:0c6fb706f747
     1 unit uFLRunQueue;
     1 unit uFLRunQueue;
     2 interface
     2 interface
     3 uses uFLTypes;
     3 uses uFLTypes;
     4 
     4 
     5 procedure queueExecution(var config: TGameConfig);
     5 procedure queueExecution(var config: TGameConfig);
     6 procedure passFlibEvent(p: pointer); cdecl;
       
     7 
     6 
     8 implementation
     7 implementation
     9 uses uFLGameConfig, hwengine, uFLThemes, uFLUICallback, uFLIPC;
     8 uses hwengine, uFLUICallback, uFLIPC;
    10 
     9 
    11 var runQueue: PGameConfig = nil;
    10 var runQueue: PGameConfig = nil;
    12 
    11 
    13 procedure nextRun;
    12 procedure nextRun;
    14 begin
    13 begin
    54     if runQueue = nil then
    53     if runQueue = nil then
    55     begin
    54     begin
    56         runQueue:= pConfig;
    55         runQueue:= pConfig;
    57 
    56 
    58         ipcSetEngineBarrier();
    57         ipcSetEngineBarrier();
    59         sendConfig(pConfig);
    58         //sendConfig(pConfig);
    60         nextRun
    59         nextRun
    61     end else
    60     end else
    62     begin
    61     begin
    63         t:= runQueue;
    62         t:= runQueue;
    64         while t^.nextConfig <> nil do 
    63         while t^.nextConfig <> nil do 
    73             end;
    72             end;
    74             t:= t^.nextConfig;
    73             t:= t^.nextConfig;
    75         end;
    74         end;
    76 
    75 
    77         ipcSetEngineBarrier();
    76         ipcSetEngineBarrier();
    78         sendConfig(pConfig);
    77         //sendConfig(pConfig);
    79         t^.nextConfig:= pConfig
    78         t^.nextConfig:= pConfig
    80     end;
    79     end;
    81 end;
    80 end;
    82 
    81 
    83 procedure passFlibEvent(p: pointer); cdecl;
       
    84 begin
       
    85     case TFLIBEvent(p^) of
       
    86         flibGameFinished: begin
       
    87             cleanupConfig;
       
    88             nextRun
       
    89         end;
       
    90     end;
       
    91 end;
       
    92 
       
    93 end.
    82 end.