summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-02-04 09:46:24 +0100
committerbunnei <bunneidev@gmail.com>2023-06-03 09:05:29 +0200
commit63a98e3e1cc9dfb306bb3f063a6c89acaf1f55ad (patch)
tree56cc0b81b82410bbbbcd8d62120ea515c1e17c5b /src
parentcore: crypto: key_manager: Add methods to reload & validate keys. (diff)
downloadyuzu-63a98e3e1cc9dfb306bb3f063a6c89acaf1f55ad.tar
yuzu-63a98e3e1cc9dfb306bb3f063a6c89acaf1f55ad.tar.gz
yuzu-63a98e3e1cc9dfb306bb3f063a6c89acaf1f55ad.tar.bz2
yuzu-63a98e3e1cc9dfb306bb3f063a6c89acaf1f55ad.tar.lz
yuzu-63a98e3e1cc9dfb306bb3f063a6c89acaf1f55ad.tar.xz
yuzu-63a98e3e1cc9dfb306bb3f063a6c89acaf1f55ad.tar.zst
yuzu-63a98e3e1cc9dfb306bb3f063a6c89acaf1f55ad.zip
Diffstat (limited to 'src')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.java2
-rw-r--r--src/android/app/src/main/jni/native.cpp11
-rw-r--r--src/android/app/src/main/jni/native.h3
3 files changed, 14 insertions, 2 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.java b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.java
index acb3fc2d6..44869b233 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.java
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.java
@@ -165,6 +165,8 @@ public final class NativeLibrary {
public static native void SetAppDirectory(String directory);
+ public static native boolean ReloadKeys();
+
// Create the config.ini file.
public static native void CreateConfigFile();
diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp
index c1880db46..358316c48 100644
--- a/src/android/app/src/main/jni/native.cpp
+++ b/src/android/app/src/main/jni/native.cpp
@@ -19,6 +19,7 @@
#include "common/settings.h"
#include "core/core.h"
#include "core/cpu_manager.h"
+#include "core/crypto/key_manager.h"
#include "core/file_sys/registered_cache.h"
#include "core/file_sys/vfs_real.h"
#include "core/hid/hid_core.h"
@@ -261,12 +262,18 @@ void Java_org_yuzu_yuzu_1emu_NativeLibrary_NotifyOrientationChange(JNIEnv* env,
jint layout_option,
jint rotation) {}
-void Java_org_yuzu_yuzu_1emu_NativeLibrary_SetAppDirectory([[maybe_unused]] JNIEnv* env,
+void Java_org_yuzu_yuzu_1emu_NativeLibrary_SetAppDirectory(JNIEnv* env,
[[maybe_unused]] jclass clazz,
- [[maybe_unused]] jstring j_directory) {
+ jstring j_directory) {
Common::FS::SetAppDirectory(GetJString(env, j_directory));
}
+jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_ReloadKeys(JNIEnv* env,
+ [[maybe_unused]] jclass clazz) {
+ Core::Crypto::KeyManager::Instance().ReloadKeys();
+ return static_cast<jboolean>(Core::Crypto::KeyManager::Instance().IsKeysLoaded());
+}
+
void Java_org_yuzu_yuzu_1emu_NativeLibrary_UnPauseEmulation([[maybe_unused]] JNIEnv* env,
[[maybe_unused]] jclass clazz) {}
diff --git a/src/android/app/src/main/jni/native.h b/src/android/app/src/main/jni/native.h
index fbe015b55..210976201 100644
--- a/src/android/app/src/main/jni/native.h
+++ b/src/android/app/src/main/jni/native.h
@@ -67,6 +67,9 @@ JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_SetAppDirectory(JNI
jclass clazz,
jstring j_directory);
+JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_ReloadKeys(JNIEnv* env,
+ jclass clazz);
+
JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_utils_DirectoryInitialization_SetSysDirectory(
JNIEnv* env, jclass clazz, jstring path_);