Browse Source

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

pull/2/head
Alibek Omarov 5 years ago
parent
commit
e8006c3253
  1. 17
      engine/client/cl_gameui.c
  2. 13
      engine/common/system.c
  3. 1
      engine/common/system.h

17
engine/client/cl_gameui.c

@ -1092,6 +1092,21 @@ static void GL_ProcessTexture( int texnum, float gamma, int topColor, int bottom
ref.dllFuncs.GL_ProcessTexture( texnum, gamma, topColor, bottomColor ); 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 // engine callbacks
static ui_enginefuncs_t gEngfuncs = static ui_enginefuncs_t gEngfuncs =
{ {
@ -1164,7 +1179,7 @@ static ui_enginefuncs_t gEngfuncs =
CL_GetDemoComment, CL_GetDemoComment,
pfnCheckGameDll, pfnCheckGameDll,
pfnGetClipboardData, pfnGetClipboardData,
Sys_ShellExecute, UI_ShellExecute,
Host_WriteServerConfig, Host_WriteServerConfig,
pfnChangeInstance, pfnChangeInstance,
pfnStartBackgroundTrack, pfnStartBackgroundTrack,

13
engine/common/system.c

@ -138,19 +138,6 @@ char *Sys_GetCurrentUser( void )
return "Player"; 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 Sys_ParseCommandLine

1
engine/common/system.h

@ -63,7 +63,6 @@ void Sys_SetClipboardData( const char *buffer, size_t size );
#define Sys_GetParmFromCmdLine( parm, out ) _Sys_GetParmFromCmdLine( parm, out, sizeof( out )) #define Sys_GetParmFromCmdLine( parm, out ) _Sys_GetParmFromCmdLine( parm, out, sizeof( out ))
qboolean _Sys_GetParmFromCmdLine( const char *parm, char *out, size_t size ); qboolean _Sys_GetParmFromCmdLine( const char *parm, char *out, size_t size );
qboolean Sys_GetIntFromCmdLine( const char *parm, int *out ); 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_SendKeyEvents( void );
void Sys_Print( const char *pMsg ); void Sys_Print( const char *pMsg );
void Sys_PrintLog( const char *pMsg ); void Sys_PrintLog( const char *pMsg );

Loading…
Cancel
Save