diff options
author | Charles Lombardo <clombardo169@gmail.com> | 2023-10-25 04:51:09 +0200 |
---|---|---|
committer | Charles Lombardo <clombardo169@gmail.com> | 2023-10-30 16:38:10 +0100 |
commit | 585b6e9d46b207a6b48a021ea35636fb8c92b405 (patch) | |
tree | 8909909ba82a90979748d6fa2bd875aa47cea050 /src/common/fs/fs_android.h | |
parent | android: Refactor game metadata collection to new file (diff) | |
download | yuzu-585b6e9d46b207a6b48a021ea35636fb8c92b405.tar yuzu-585b6e9d46b207a6b48a021ea35636fb8c92b405.tar.gz yuzu-585b6e9d46b207a6b48a021ea35636fb8c92b405.tar.bz2 yuzu-585b6e9d46b207a6b48a021ea35636fb8c92b405.tar.lz yuzu-585b6e9d46b207a6b48a021ea35636fb8c92b405.tar.xz yuzu-585b6e9d46b207a6b48a021ea35636fb8c92b405.tar.zst yuzu-585b6e9d46b207a6b48a021ea35636fb8c92b405.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/fs/fs_android.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/common/fs/fs_android.h b/src/common/fs/fs_android.h index b441c2a12..2c9234313 100644 --- a/src/common/fs/fs_android.h +++ b/src/common/fs/fs_android.h @@ -17,19 +17,28 @@ "(Ljava/lang/String;)Z") \ V(Exists, bool, file_exists, CallStaticBooleanMethod, "exists", "(Ljava/lang/String;)Z") +#define ANDROID_SINGLE_PATH_HELPER_FUNCTIONS(V) \ + V(GetParentDirectory, get_parent_directory, CallStaticObjectMethod, "getParentDirectory", \ + "(Ljava/lang/String;)Ljava/lang/String;") \ + V(GetFilename, get_filename, CallStaticObjectMethod, "getFilename", \ + "(Ljava/lang/String;)Ljava/lang/String;") + namespace Common::FS::Android { static JavaVM* g_jvm = nullptr; static jclass native_library = nullptr; +#define FH(FunctionName, JMethodID, Caller, JMethodName, Signature) F(JMethodID) #define FR(FunctionName, ReturnValue, JMethodID, Caller, JMethodName, Signature) F(JMethodID) #define FS(FunctionName, ReturnValue, Parameters, JMethodID, JMethodName, Signature) F(JMethodID) #define F(JMethodID) static jmethodID JMethodID = nullptr; +ANDROID_SINGLE_PATH_HELPER_FUNCTIONS(FH) ANDROID_SINGLE_PATH_DETERMINE_FUNCTIONS(FR) ANDROID_STORAGE_FUNCTIONS(FS) #undef F #undef FS #undef FR +#undef FH enum class OpenMode { Read, @@ -62,4 +71,10 @@ ANDROID_SINGLE_PATH_DETERMINE_FUNCTIONS(FR) #undef F #undef FR +#define FH(FunctionName, JMethodID, Caller, JMethodName, Signature) F(FunctionName) +#define F(FunctionName) std::string FunctionName(const std::string& filepath); +ANDROID_SINGLE_PATH_HELPER_FUNCTIONS(FH) +#undef F +#undef FH + } // namespace Common::FS::Android |