mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 01:45:19 +01:00
filesystem: add XASH_ANDROID_ASSETS macro for aassets switch
This commit is contained in:
parent
1bb168b33f
commit
91101c4f00
@ -181,6 +181,10 @@ Default build-depended cvar and constant values
|
||||
#define XASH_INTERNAL_GAMELIBS
|
||||
#endif // XASH_ANDROID || XASH_IOS || XASH_EMSCRIPTEN
|
||||
|
||||
#if XASH_ANDROID && XASH_SDL
|
||||
#define XASH_ANDROID_ASSETS 1
|
||||
#endif
|
||||
|
||||
// Defaults
|
||||
#ifndef DEFAULT_TOUCH_ENABLE
|
||||
#define DEFAULT_TOUCH_ENABLE "0"
|
||||
|
@ -15,7 +15,7 @@ GNU General Public License for more details.
|
||||
|
||||
#include "port.h"
|
||||
|
||||
#if XASH_ANDROID && XASH_SDL
|
||||
#if XASH_ANDROID_ASSETS
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@ -324,4 +324,4 @@ void FS_InitAndroid( void )
|
||||
jni.getAssets = (*jni.env)->GetMethodID( jni.env, jni.activity_class, "getAssets", "(Z)Landroid/content/res/AssetManager;" );
|
||||
}
|
||||
|
||||
#endif // XASH_ANDROID
|
||||
#endif // XASH_ANDROID_ASSETS
|
||||
|
@ -72,7 +72,7 @@ const fs_archive_t g_archives[] =
|
||||
static const fs_archive_t g_directory_archive =
|
||||
{ NULL, SEARCHPATH_PLAIN, FS_AddDir_Fullpath, false };
|
||||
|
||||
#if XASH_ANDROID && XASH_SDL
|
||||
#if XASH_ANDROID_ASSETS
|
||||
static const fs_archive_t g_android_archive =
|
||||
{ NULL, SEARCHPATH_ANDROID_ASSETS, FS_AddAndroidAssets_Fullpath, false };
|
||||
#endif
|
||||
@ -406,7 +406,7 @@ void FS_AddGameDirectory( const char *dir, uint flags )
|
||||
|
||||
stringlistfreecontents( &list );
|
||||
|
||||
#if XASH_ANDROID && XASH_SDL
|
||||
#if XASH_ANDROID_ASSETS
|
||||
FS_AddArchive_Fullpath( &g_android_archive, dir, flags );
|
||||
#endif
|
||||
|
||||
@ -1441,7 +1441,7 @@ qboolean FS_InitStdio( qboolean unused_set_to_true, const char *rootdir, const c
|
||||
|
||||
FS_InitMemory();
|
||||
|
||||
#if XASH_ANDROID && XASH_SDL
|
||||
#if XASH_ANDROID_ASSETS
|
||||
FS_InitAndroid();
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user