summaryrefslogtreecommitdiffstats
path: root/src/android/app
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-02-20 12:19:51 +0100
committerbunnei <bunneidev@gmail.com>2023-06-03 09:05:32 +0200
commit0276197744d5026f32a0b33e378cbf3636f97008 (patch)
tree13ba9ba39150c36fae11ebcb36fc24ec759b4a76 /src/android/app
parentvideo_core: vulkan_device: Correct error message for unsuitable driver. (diff)
downloadyuzu-0276197744d5026f32a0b33e378cbf3636f97008.tar
yuzu-0276197744d5026f32a0b33e378cbf3636f97008.tar.gz
yuzu-0276197744d5026f32a0b33e378cbf3636f97008.tar.bz2
yuzu-0276197744d5026f32a0b33e378cbf3636f97008.tar.lz
yuzu-0276197744d5026f32a0b33e378cbf3636f97008.tar.xz
yuzu-0276197744d5026f32a0b33e378cbf3636f97008.tar.zst
yuzu-0276197744d5026f32a0b33e378cbf3636f97008.zip
Diffstat (limited to 'src/android/app')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.java3
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryInitialization.java2
-rw-r--r--src/android/app/src/main/jni/native.cpp7
-rw-r--r--src/android/app/src/main/jni/native.h4
4 files changed, 8 insertions, 8 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 c09b711fd..6f76c3f95 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
@@ -185,8 +185,7 @@ public final class NativeLibrary {
public static native boolean ReloadKeys();
- // Create the config.ini file.
- public static native void CreateConfigFile();
+ public static native void InitializeEmulation();
public static native int DefaultCPUCore();
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryInitialization.java b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryInitialization.java
index f922ae183..6464c2286 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryInitialization.java
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryInitialization.java
@@ -27,7 +27,7 @@ public final class DirectoryInitialization {
if (directoryState != DirectoryInitializationState.YUZU_DIRECTORIES_INITIALIZED) {
initializeInternalStorage(context);
- NativeLibrary.CreateConfigFile();
+ NativeLibrary.InitializeEmulation();
directoryState = DirectoryInitializationState.YUZU_DIRECTORIES_INITIALIZED;
}
diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp
index 2413a78f0..505ae1176 100644
--- a/src/android/app/src/main/jni/native.cpp
+++ b/src/android/app/src/main/jni/native.cpp
@@ -40,7 +40,6 @@ namespace {
class EmulationSession final {
public:
EmulationSession() {
- m_system.Initialize();
m_vfs = std::make_shared<FileSys::RealVfsFilesystem>();
}
@@ -126,7 +125,6 @@ public:
// Initialize system.
m_system.SetShuttingDown(false);
- m_system.Initialize();
m_system.ApplySettings();
m_system.HIDCore().ReloadInputDevices();
m_system.SetContentProvider(std::make_unique<FileSys::ContentProviderUnion>());
@@ -498,9 +496,12 @@ jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_GetGitRevision([[maybe_unused]] JN
return {};
}
-void Java_org_yuzu_yuzu_1emu_NativeLibrary_CreateConfigFile
+void Java_org_yuzu_yuzu_1emu_NativeLibrary_InitializeEmulation
[[maybe_unused]] (JNIEnv* env, [[maybe_unused]] jclass clazz) {
+ // Create the default config.ini.
Config{};
+ // Initialize the emulated system.
+ EmulationSession::GetInstance().System().Initialize();
}
jint Java_org_yuzu_yuzu_1emu_NativeLibrary_DefaultCPUCore([[maybe_unused]] JNIEnv* env,
diff --git a/src/android/app/src/main/jni/native.h b/src/android/app/src/main/jni/native.h
index f799560e4..192c9261d 100644
--- a/src/android/app/src/main/jni/native.h
+++ b/src/android/app/src/main/jni/native.h
@@ -86,8 +86,8 @@ JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_SetSysDirectory(JNI
jclass clazz,
jstring path);
-JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_CreateConfigFile(JNIEnv* env,
- jclass clazz);
+JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_InitializeEmulation(JNIEnv* env,
+ jclass clazz);
JNIEXPORT jint JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_DefaultCPUCore(JNIEnv* env,
jclass clazz);