Ignore:
Timestamp:
Apr 14, 2021, 3:49:11 PM (4 years ago)
Author:
chronos
Message:
  • Fixed: Build under Windows. fpAsync and fpSock are not supported under Windows. Networking needs to be replaced by something else multi-platform.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Network/UNetworkClient.pas

    r365 r369  
    66
    77uses
    8   Classes, SysUtils, fpsock, fpAsync, Protocol;
     8  Classes, SysUtils{$IFDEF LINUX}, fpAsync, fpsock{$ENDIF}, Protocol;
    99
     10{$IFDEF LINUX}
    1011type
    1112  { TTCPClientThread }
     
    3940var
    4041  NetworkClient: TNetworkClient;
     42{$ENDIF}
    4143
    4244procedure Client(Command, Player: Integer; var Data); stdcall;
     
    4850  LocalPlayer, Global, UNetworkCommon;
    4951
    50 function LocalServer(Command, Player, Subject: Integer; var Data): Integer; stdcall;
    51 begin
    52   if Assigned(NetworkClient) then
    53     Result := NetworkClient.Server(TCommand(Command), Player, Subject, Data);
    54 end;
    55 
    5652procedure Client(Command, Player: Integer; var Data);
    5753var
    5854  Cmd: TCommand;
    5955begin
     56  {$IFDEF LINUX}
    6057  Cmd := TCommand(Command);
    6158  case Cmd of
     
    7168    end;
    7269  end;
     70  {$ENDIF}
     71end;
     72
     73{$IFDEF LINUX}
     74function LocalServer(Command, Player, Subject: Integer; var Data): Integer; stdcall;
     75begin
     76  if Assigned(NetworkClient) then
     77    Result := NetworkClient.Server(TCommand(Command), Player, Subject, Data);
    7378end;
    7479
     
    167172  inherited;
    168173end;
     174{$ENDIF}
    169175
    170176end.
Note: See TracChangeset for help on using the changeset viewer.