Skip to content

Commit 4279461

Browse files
committed
xrGame: implement linux GetCurrentProcessId()
1 parent db2894d commit 4279461

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/xrGame/xrServer.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -829,8 +829,11 @@ void xrServer::Server_Client_Check(IClient* CL)
829829
{
830830
return;
831831
};
832-
#ifndef LINUX // FIXME!!!
832+
#ifdef LINUX // FIXME!!!
833+
if (CL->process_id == getpid())
834+
#else
833835
if (CL->process_id == GetCurrentProcessId())
836+
#endif
834837
{
835838
CL->flags.bLocal = 1;
836839
SV_Client = (xrClientData*)CL;
@@ -840,7 +843,6 @@ void xrServer::Server_Client_Check(IClient* CL)
840843
{
841844
CL->flags.bLocal = 0;
842845
}
843-
#endif
844846
};
845847

846848
bool xrServer::OnCL_QueryHost()
@@ -986,7 +988,9 @@ void xrServer::create_direct_client()
986988
SClientConnectData cl_data;
987989
cl_data.clientID.set(1);
988990
xr_strcpy(cl_data.name, "single_player");
989-
#ifndef LINUX // FIXME!!!
991+
#ifdef LINUX
992+
cl_data.process_id = getpid();
993+
#else
990994
cl_data.process_id = GetCurrentProcessId();
991995
#endif
992996
new_client(&cl_data);

0 commit comments

Comments
 (0)