diff options
| author | 2024-02-09 11:49:25 -0500 | |
|---|---|---|
| committer | 2024-02-09 11:49:25 -0500 | |
| commit | 7ec7ff0f303504950e4270e91076a33efd0ceb17 (patch) | |
| tree | 1e8346f775550eefd491aa8280412d86000dd637 /src/common/android/android_common.h | |
| parent | Merge pull request #12927 from german77/cheat-pause (diff) | |
| parent | android: Run OnEmulationStarted frontend callback in another thread (diff) | |
| download | yuzu-7ec7ff0f303504950e4270e91076a33efd0ceb17.tar.gz yuzu-7ec7ff0f303504950e4270e91076a33efd0ceb17.tar.xz yuzu-7ec7ff0f303504950e4270e91076a33efd0ceb17.zip | |
Merge pull request #12920 from t895/jni-common
android: Move JNI setup and helpers to common
Diffstat (limited to 'src/common/android/android_common.h')
| -rw-r--r-- | src/common/android/android_common.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/common/android/android_common.h b/src/common/android/android_common.h new file mode 100644 index 000000000..d0ccb4ec2 --- /dev/null +++ b/src/common/android/android_common.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include <string> | ||
| 7 | |||
| 8 | #include <jni.h> | ||
| 9 | #include "common/common_types.h" | ||
| 10 | |||
| 11 | namespace Common::Android { | ||
| 12 | |||
| 13 | std::string GetJString(JNIEnv* env, jstring jstr); | ||
| 14 | jstring ToJString(JNIEnv* env, std::string_view str); | ||
| 15 | jstring ToJString(JNIEnv* env, std::u16string_view str); | ||
| 16 | |||
| 17 | double GetJDouble(JNIEnv* env, jobject jdouble); | ||
| 18 | jobject ToJDouble(JNIEnv* env, double value); | ||
| 19 | |||
| 20 | s32 GetJInteger(JNIEnv* env, jobject jinteger); | ||
| 21 | jobject ToJInteger(JNIEnv* env, s32 value); | ||
| 22 | |||
| 23 | bool GetJBoolean(JNIEnv* env, jobject jboolean); | ||
| 24 | jobject ToJBoolean(JNIEnv* env, bool value); | ||
| 25 | |||
| 26 | } // namespace Common::Android | ||