Hide Android asset manager state from asset header
This commit is contained in:
@@ -9,9 +9,15 @@
|
||||
#endif
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#include <android/asset_manager.h>
|
||||
#include <dirent.h>
|
||||
AAssetManager* Asset::m_am;
|
||||
bool android_create_dir(const std::string& path);
|
||||
|
||||
void Asset::set_android_asset_manager(AAssetManager* asset_manager)
|
||||
{
|
||||
m_am = asset_manager;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool Asset::delete_file(const std::string& path)
|
||||
|
||||
10
src/asset.h
10
src/asset.h
@@ -1,11 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __ANDROID__
|
||||
struct AAsset;
|
||||
struct AAssetManager;
|
||||
#endif
|
||||
|
||||
class Asset
|
||||
{
|
||||
public:
|
||||
#ifdef __ANDROID__
|
||||
static void set_android_asset_manager(AAssetManager* asset_manager);
|
||||
|
||||
private:
|
||||
static AAssetManager* m_am;
|
||||
AAsset* m_asset = nullptr;
|
||||
|
||||
public:
|
||||
#endif
|
||||
static std::vector<std::string> list_files(std::string folder, const std::string& filter_regex);
|
||||
static bool exist(std::string path);
|
||||
|
||||
Reference in New Issue
Block a user