diff --git a/engine/client/cl_game.c b/engine/client/cl_game.c index 0737489e..2b64bec0 100644 --- a/engine/client/cl_game.c +++ b/engine/client/cl_game.c @@ -3923,8 +3923,6 @@ void CL_UnloadProgs( void ) Cmd_Unlink( CMD_CLIENTDLL ); } -void GetSecuredClientAPI( CL_EXPORT_FUNCS F ); - qboolean CL_LoadProgs( const char *name ) { static playermove_t gpMove; @@ -3983,7 +3981,7 @@ qboolean CL_LoadProgs( const char *name ) Con_Reportf( "CL_LoadProgs: found single callback export (secured client dlls)\n" ); // trying to fill interface now - GetSecuredClientAPI( GetClientAPI ); + CL_GetSecuredClientAPI( GetClientAPI ); } if ( GetClientAPI != NULL ) diff --git a/engine/client/cl_securedstub.c b/engine/client/cl_securedstub.c index 28034cf2..fd7746b1 100644 --- a/engine/client/cl_securedstub.c +++ b/engine/client/cl_securedstub.c @@ -109,6 +109,11 @@ typedef struct cldll_func_dst_s void (*pfnGetPlayerTeam)( int *iPlayer ); } cldll_func_dst_t; +struct cl_enginefunc_dst_s; +struct modshelpers_s; +struct modchelpers_s; +struct engdata_s; + typedef struct modfuncs_s { void (*m_pfnLoadMod)( char *pchModule ); @@ -398,14 +403,10 @@ static cldll_func_dst_t cldllFuncDst = DstGetPlayerTeam, }; -void GetSecuredClientAPI( CL_EXPORT_FUNCS F ) +void CL_GetSecuredClientAPI( CL_EXPORT_FUNCS F ) { - cldll_func_src_t cldllFuncSrc; - modfuncs_t modFuncs; - const dllfunc_t *func; - - memset( &cldllFuncSrc, 0, sizeof( cldllFuncSrc ) ); - memset( &modFuncs, 0, sizeof( modFuncs ) ); + cldll_func_src_t cldllFuncSrc = { 0 }; + modfuncs_t modFuncs = { 0 }; // secured client dlls need these *(cldll_func_dst_t **)&cldllFuncSrc.pfnVidInit = &cldllFuncDst; diff --git a/engine/client/client.h b/engine/client/client.h index 03f75131..129caca6 100644 --- a/engine/client/client.h +++ b/engine/client/client.h @@ -1109,6 +1109,11 @@ void pfnPIC_DrawAdditive( int x, int y, int width, int height, const wrect_t *pr qboolean Mobile_Init( void ); void Mobile_Shutdown( void ); +// +// cl_securedstub.c +// +void CL_GetSecuredClientAPI( CL_EXPORT_FUNCS F ); + // // cl_video.c //