mirror of https://github.com/ZDoom/raze-gles.git
git-svn-id: https://svn.eduke32.com/eduke32@133 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c0f4fd552b
commit
8b9523640a
|
@ -7471,7 +7471,7 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
signed int rancid_players = 0;
|
signed int rancid_players = 0;
|
||||||
char rancid_ips[MAXPLAYERS+1][16];
|
char rancid_ips[MAXPLAYERS][16];
|
||||||
|
|
||||||
typedef struct { char *text; int tokenid; } tokenlist;
|
typedef struct { char *text; int tokenid; } tokenlist;
|
||||||
static tokenlist basetokens[] =
|
static tokenlist basetokens[] =
|
||||||
|
|
|
@ -10,33 +10,33 @@
|
||||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
|
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
|
||||||
{
|
{
|
||||||
int i,j;
|
int i,j;
|
||||||
|
char CmdLine[1024], sCmdLine[1024], szFileName[255];
|
||||||
LPTSTR szCmdLine;
|
LPTSTR szCmdLine;
|
||||||
|
|
||||||
char CmdLine[1024];
|
|
||||||
char sCmdLine[1024];
|
|
||||||
char szFileName[255];
|
|
||||||
|
|
||||||
FILE * fp=fopen("wrapper.log","w");
|
FILE * fp=fopen("wrapper.log","w");
|
||||||
STARTUPINFO si;
|
STARTUPINFO si;
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
|
|
||||||
ZeroMemory(&szFileName,sizeof(szFileName));
|
|
||||||
strcpy(sCmdLine,lpCmdLine);
|
strcpy(sCmdLine,lpCmdLine);
|
||||||
for(i=0;i<(signed)strlen(sCmdLine);i++)
|
|
||||||
|
i = 0;
|
||||||
|
|
||||||
|
while(i < (signed)strlen(sCmdLine))
|
||||||
{
|
{
|
||||||
if(sCmdLine[i] == '-' && sCmdLine[i+1] == 'n' && sCmdLine[i+2] == 'e' && sCmdLine[i+3] == 't')
|
if(sCmdLine[i] == '-' && sCmdLine[i+1] == 'n' && sCmdLine[i+2] == 'e' && sCmdLine[i+3] == 't')
|
||||||
{
|
{
|
||||||
|
CmdLine[i-1] = '\0';
|
||||||
j = 0,i += 5;
|
j = 0,i += 5;
|
||||||
while(!sCmdLine[i] != ' ' && i<(signed)strlen(sCmdLine))
|
while(sCmdLine[i] != ' ' && i < (signed)strlen(sCmdLine))
|
||||||
{
|
{
|
||||||
szFileName[j] = sCmdLine[i];
|
szFileName[j] = sCmdLine[i];
|
||||||
if(sCmdLine[i+1] == ' ')
|
|
||||||
break;
|
|
||||||
j++,i++;
|
j++,i++;
|
||||||
}
|
}
|
||||||
|
szFileName[j] = '\0';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else CmdLine[i] = sCmdLine[i];
|
else CmdLine[i] = sCmdLine[i];
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(szFileName[0])
|
if(szFileName[0])
|
||||||
|
@ -59,7 +59,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, in
|
||||||
if (!CreateProcess(NULL,szCmdLine,NULL,NULL,0,0,NULL,NULL,&si,&pi)) {
|
if (!CreateProcess(NULL,szCmdLine,NULL,NULL,0,0,NULL,NULL,&si,&pi)) {
|
||||||
MessageBox(0,"Failed to start eduke32.exe.", "Failure starting game", MB_OK|MB_ICONSTOP);
|
MessageBox(0,"Failed to start eduke32.exe.", "Failure starting game", MB_OK|MB_ICONSTOP);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
} else WaitForSingleObject(pi.hProcess,INFINITE);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue