mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: platform: psvita: add Atlas_AllocBlock to the vrtld export list temporarily
This commit is contained in:
@@ -81,6 +81,7 @@ static const vrtld_export_t aux_exports[] =
|
||||
VRTLD_EXPORT( "dlopen", vrtld_dlopen ),
|
||||
VRTLD_EXPORT( "dlclose", vrtld_dlclose ),
|
||||
VRTLD_EXPORT( "dlsym", vrtld_dlsym ),
|
||||
VRTLD_EXPORT_SYMBOL( Atlas_AllocBlock ), // HACKHACK: remove when atlas utils will be used in engine
|
||||
};
|
||||
|
||||
const vrtld_export_t *__vrtld_exports = aux_exports;
|
||||
@@ -149,24 +150,10 @@ int PSVita_GetArgv( int in_argc, char **in_argv, char ***out_argv )
|
||||
return fake_argc;
|
||||
}
|
||||
|
||||
// HACKHACK: libpublic is a static archive and the renderers are loaded as
|
||||
// dynamic libs that resolve symbols from the engine ELF; force a reference
|
||||
// to Atlas_AllocBlock here so the archive object isn't dropped at link time
|
||||
static void PSVita_PinPublicSymbols( void )
|
||||
{
|
||||
static atlas_t dummy;
|
||||
int x, y;
|
||||
|
||||
Atlas_Init( &dummy, 16 );
|
||||
Atlas_AllocBlock( &dummy, 1, 1, &x, &y );
|
||||
}
|
||||
|
||||
void PSVita_Init( void )
|
||||
{
|
||||
char xashdir[1024] = { 0 };
|
||||
|
||||
PSVita_PinPublicSymbols();
|
||||
|
||||
// cd to the base dir immediately for library loading to work
|
||||
if( PSVita_GetBasePath( xashdir, sizeof( xashdir )))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user