Skip to content

Commit

Permalink
xrGame: implement linux GetCurrentProcessId()
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed Nov 6, 2018
1 parent db2894d commit 4279461
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/xrGame/xrServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,8 +829,11 @@ void xrServer::Server_Client_Check(IClient* CL)
{
return;
};
#ifndef LINUX // FIXME!!!
#ifdef LINUX // FIXME!!!
if (CL->process_id == getpid())
#else
if (CL->process_id == GetCurrentProcessId())
#endif
{
CL->flags.bLocal = 1;
SV_Client = (xrClientData*)CL;
Expand All @@ -840,7 +843,6 @@ void xrServer::Server_Client_Check(IClient* CL)
{
CL->flags.bLocal = 0;
}
#endif
};

bool xrServer::OnCL_QueryHost()
Expand Down Expand Up @@ -986,7 +988,9 @@ void xrServer::create_direct_client()
SClientConnectData cl_data;
cl_data.clientID.set(1);
xr_strcpy(cl_data.name, "single_player");
#ifndef LINUX // FIXME!!!
#ifdef LINUX
cl_data.process_id = getpid();
#else
cl_data.process_id = GetCurrentProcessId();
#endif
new_client(&cl_data);
Expand Down

0 comments on commit 4279461

Please sign in to comment.