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 @@ -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 = @@ -1164,7 +1179,7 @@ static ui_enginefuncs_t gEngfuncs =
CL_GetDemoComment,
pfnCheckGameDll,
pfnGetClipboardData,
Sys_ShellExecute,
UI_ShellExecute,
Host_WriteServerConfig,
pfnChangeInstance,
pfnStartBackgroundTrack,

13
engine/common/system.c

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

1
engine/common/system.h

@ -63,7 +63,6 @@ void Sys_SetClipboardData( const char *buffer, size_t size ); @@ -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 );

Loading…
Cancel
Save