diff options
| author | 2023-10-30 13:28:11 -0400 | |
|---|---|---|
| committer | 2023-10-30 13:28:11 -0400 | |
| commit | 07276cf62ad5a32ae7a9867029a05a4fbb141d5c (patch) | |
| tree | 3eaac7c7fe07db8b44893341ec885e4dfc31d8c8 /src/common/fs/fs_android.h | |
| parent | Merge pull request #11920 from Termynat0r/master (diff) | |
| parent | android: FileUtil: Add option to suppress log for native exists() calls (diff) | |
| download | yuzu-07276cf62ad5a32ae7a9867029a05a4fbb141d5c.tar.gz yuzu-07276cf62ad5a32ae7a9867029a05a4fbb141d5c.tar.xz yuzu-07276cf62ad5a32ae7a9867029a05a4fbb141d5c.zip | |
Merge pull request #11908 from t895/log-spam
android: Fix URI parsing in native code
Diffstat (limited to 'src/common/fs/fs_android.h')
| -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 @@ | |||
| 17 | "(Ljava/lang/String;)Z") \ | 17 | "(Ljava/lang/String;)Z") \ |
| 18 | V(Exists, bool, file_exists, CallStaticBooleanMethod, "exists", "(Ljava/lang/String;)Z") | 18 | V(Exists, bool, file_exists, CallStaticBooleanMethod, "exists", "(Ljava/lang/String;)Z") |
| 19 | 19 | ||
| 20 | #define ANDROID_SINGLE_PATH_HELPER_FUNCTIONS(V) \ | ||
| 21 | V(GetParentDirectory, get_parent_directory, CallStaticObjectMethod, "getParentDirectory", \ | ||
| 22 | "(Ljava/lang/String;)Ljava/lang/String;") \ | ||
| 23 | V(GetFilename, get_filename, CallStaticObjectMethod, "getFilename", \ | ||
| 24 | "(Ljava/lang/String;)Ljava/lang/String;") | ||
| 25 | |||
| 20 | namespace Common::FS::Android { | 26 | namespace Common::FS::Android { |
| 21 | 27 | ||
| 22 | static JavaVM* g_jvm = nullptr; | 28 | static JavaVM* g_jvm = nullptr; |
| 23 | static jclass native_library = nullptr; | 29 | static jclass native_library = nullptr; |
| 24 | 30 | ||
| 31 | #define FH(FunctionName, JMethodID, Caller, JMethodName, Signature) F(JMethodID) | ||
| 25 | #define FR(FunctionName, ReturnValue, JMethodID, Caller, JMethodName, Signature) F(JMethodID) | 32 | #define FR(FunctionName, ReturnValue, JMethodID, Caller, JMethodName, Signature) F(JMethodID) |
| 26 | #define FS(FunctionName, ReturnValue, Parameters, JMethodID, JMethodName, Signature) F(JMethodID) | 33 | #define FS(FunctionName, ReturnValue, Parameters, JMethodID, JMethodName, Signature) F(JMethodID) |
| 27 | #define F(JMethodID) static jmethodID JMethodID = nullptr; | 34 | #define F(JMethodID) static jmethodID JMethodID = nullptr; |
| 35 | ANDROID_SINGLE_PATH_HELPER_FUNCTIONS(FH) | ||
| 28 | ANDROID_SINGLE_PATH_DETERMINE_FUNCTIONS(FR) | 36 | ANDROID_SINGLE_PATH_DETERMINE_FUNCTIONS(FR) |
| 29 | ANDROID_STORAGE_FUNCTIONS(FS) | 37 | ANDROID_STORAGE_FUNCTIONS(FS) |
| 30 | #undef F | 38 | #undef F |
| 31 | #undef FS | 39 | #undef FS |
| 32 | #undef FR | 40 | #undef FR |
| 41 | #undef FH | ||
| 33 | 42 | ||
| 34 | enum class OpenMode { | 43 | enum class OpenMode { |
| 35 | Read, | 44 | Read, |
| @@ -62,4 +71,10 @@ ANDROID_SINGLE_PATH_DETERMINE_FUNCTIONS(FR) | |||
| 62 | #undef F | 71 | #undef F |
| 63 | #undef FR | 72 | #undef FR |
| 64 | 73 | ||
| 74 | #define FH(FunctionName, JMethodID, Caller, JMethodName, Signature) F(FunctionName) | ||
| 75 | #define F(FunctionName) std::string FunctionName(const std::string& filepath); | ||
| 76 | ANDROID_SINGLE_PATH_HELPER_FUNCTIONS(FH) | ||
| 77 | #undef F | ||
| 78 | #undef FH | ||
| 79 | |||
| 65 | } // namespace Common::FS::Android | 80 | } // namespace Common::FS::Android |