hedgewars/uIO.pas
branchsdl2transition
changeset 9682 aa2431ed87b2
parent 9301 c5d1c8259ef4
child 11362 ed5a6478e710
equal deleted inserted replaced
9679:dfaa39674e1e 9682:aa2431ed87b2
   104 
   104 
   105 procedure InitIPC;
   105 procedure InitIPC;
   106 var ipaddr: TIPAddress;
   106 var ipaddr: TIPAddress;
   107 begin
   107 begin
   108     WriteToConsole('Init SDL_Net... ');
   108     WriteToConsole('Init SDL_Net... ');
   109     SDLTry(SDLNet_Init = 0, true);
   109     SDLTry(SDLNet_Init = 0, 'SDLNet_Init', true);
   110     fds:= SDLNet_AllocSocketSet(1);
   110     fds:= SDLNet_AllocSocketSet(1);
   111     SDLTry(fds <> nil, true);
   111     SDLTry(fds <> nil, 'SDLNet_AllocSocketSet', true);
   112     WriteLnToConsole(msgOK);
   112     WriteLnToConsole(msgOK);
   113     WriteToConsole('Establishing IPC connection to tcp 127.0.0.1:' + IntToStr(ipcPort) + ' ');
   113     WriteToConsole('Establishing IPC connection to tcp 127.0.0.1:' + IntToStr(ipcPort) + ' ');
   114     {$HINTS OFF}
   114     {$HINTS OFF}
   115     SDLTry(SDLNet_ResolveHost(ipaddr, PChar('127.0.0.1'), ipcPort) = 0, true);
   115     SDLTry(SDLNet_ResolveHost(ipaddr, PChar('127.0.0.1'), ipcPort) = 0, 'SDLNet_ResolveHost', true);
   116     {$HINTS ON}
   116     {$HINTS ON}
   117     IPCSock:= SDLNet_TCP_Open(ipaddr);
   117     IPCSock:= SDLNet_TCP_Open(ipaddr);
   118     SDLTry(IPCSock <> nil, true);
   118     SDLTry(IPCSock <> nil, 'SDLNet_TCP_Open', true);
   119     WriteLnToConsole(msgOK)
   119     WriteLnToConsole(msgOK)
   120 end;
   120 end;
   121 
   121 
   122 procedure ParseIPCCommand(s: shortstring);
   122 procedure ParseIPCCommand(s: shortstring);
   123 var loTicks: Word;
   123 var loTicks: Word;