engine: move ShellExecute to client, as it cannot be used in dedicated

This commit is contained in:
Alibek Omarov 2019-09-19 17:09:01 +03:00
parent 07aa9595c0
commit e8006c3253
3 changed files with 16 additions and 15 deletions

View File

@ -1092,6 +1092,21 @@ static void GL_ProcessTexture( int texnum, float gamma, int topColor, int bottom
ref.dllFuncs.GL_ProcessTexture( texnum, gamma, topColor, bottomColor );
}
/*
=================
UI_ShellExecute
=================
*/
static void UI_ShellExecute( const char *path, const char *parms, int shouldExit )
{
Platform_ShellExecute( path, parms );
if( shouldExit )
Sys_Quit();
}
// engine callbacks
static ui_enginefuncs_t gEngfuncs =
{
@ -1164,7 +1179,7 @@ static ui_enginefuncs_t gEngfuncs =
CL_GetDemoComment,
pfnCheckGameDll,
pfnGetClipboardData,
Sys_ShellExecute,
UI_ShellExecute,
Host_WriteServerConfig,
pfnChangeInstance,
pfnStartBackgroundTrack,

View File

@ -138,19 +138,6 @@ char *Sys_GetCurrentUser( void )
return "Player";
}
/*
=================
Sys_ShellExecute
=================
*/
void Sys_ShellExecute( const char *path, const char *parms, int shouldExit )
{
Platform_ShellExecute( path, parms );
if( shouldExit )
Sys_Quit();
}
/*
==================
Sys_ParseCommandLine

View File

@ -63,7 +63,6 @@ void Sys_SetClipboardData( const char *buffer, size_t size );
#define Sys_GetParmFromCmdLine( parm, out ) _Sys_GetParmFromCmdLine( parm, out, sizeof( out ))
qboolean _Sys_GetParmFromCmdLine( const char *parm, char *out, size_t size );
qboolean Sys_GetIntFromCmdLine( const char *parm, int *out );
void Sys_ShellExecute( const char *path, const char *parms, int exit );
void Sys_SendKeyEvents( void );
void Sys_Print( const char *pMsg );
void Sys_PrintLog( const char *pMsg );