|
@@ -1,7 +1,7 @@
|
|
|
-// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
|
|
|
|
|
|
+// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
-package org.yuzu.yuzu_emu
|
|
|
|
|
|
|
+package org.suyu.suyu_emu
|
|
|
|
|
|
|
|
import android.content.DialogInterface
|
|
import android.content.DialogInterface
|
|
|
import android.net.Uri
|
|
import android.net.Uri
|
|
@@ -13,18 +13,18 @@ import android.widget.TextView
|
|
|
import androidx.annotation.Keep
|
|
import androidx.annotation.Keep
|
|
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
|
|
import java.lang.ref.WeakReference
|
|
import java.lang.ref.WeakReference
|
|
|
-import org.yuzu.yuzu_emu.activities.EmulationActivity
|
|
|
|
|
-import org.yuzu.yuzu_emu.fragments.CoreErrorDialogFragment
|
|
|
|
|
-import org.yuzu.yuzu_emu.utils.DocumentsTree
|
|
|
|
|
-import org.yuzu.yuzu_emu.utils.FileUtil
|
|
|
|
|
-import org.yuzu.yuzu_emu.utils.Log
|
|
|
|
|
-import org.yuzu.yuzu_emu.model.InstallResult
|
|
|
|
|
-import org.yuzu.yuzu_emu.model.Patch
|
|
|
|
|
-import org.yuzu.yuzu_emu.model.GameVerificationResult
|
|
|
|
|
|
|
+import org.suyu.suyu_emu.activities.EmulationActivity
|
|
|
|
|
+import org.suyu.suyu_emu.fragments.CoreErrorDialogFragment
|
|
|
|
|
+import org.suyu.suyu_emu.utils.DocumentsTree
|
|
|
|
|
+import org.suyu.suyu_emu.utils.FileUtil
|
|
|
|
|
+import org.suyu.suyu_emu.utils.Log
|
|
|
|
|
+import org.suyu.suyu_emu.model.InstallResult
|
|
|
|
|
+import org.suyu.suyu_emu.model.Patch
|
|
|
|
|
+import org.suyu.suyu_emu.model.GameVerificationResult
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Class which contains methods that interact
|
|
* Class which contains methods that interact
|
|
|
- * with the native side of the Yuzu code.
|
|
|
|
|
|
|
+ * with the native side of the Suyu code.
|
|
|
*/
|
|
*/
|
|
|
object NativeLibrary {
|
|
object NativeLibrary {
|
|
|
@JvmField
|
|
@JvmField
|
|
@@ -32,7 +32,7 @@ object NativeLibrary {
|
|
|
|
|
|
|
|
init {
|
|
init {
|
|
|
try {
|
|
try {
|
|
|
- System.loadLibrary("yuzu-android")
|
|
|
|
|
|
|
+ System.loadLibrary("suyu-android")
|
|
|
} catch (ex: UnsatisfiedLinkError) {
|
|
} catch (ex: UnsatisfiedLinkError) {
|
|
|
error("[NativeLibrary] $ex")
|
|
error("[NativeLibrary] $ex")
|
|
|
}
|
|
}
|
|
@@ -42,7 +42,7 @@ object NativeLibrary {
|
|
|
@JvmStatic
|
|
@JvmStatic
|
|
|
fun openContentUri(path: String?, openmode: String?): Int {
|
|
fun openContentUri(path: String?, openmode: String?): Int {
|
|
|
return if (DocumentsTree.isNativePath(path!!)) {
|
|
return if (DocumentsTree.isNativePath(path!!)) {
|
|
|
- YuzuApplication.documentsTree!!.openContentUri(path, openmode)
|
|
|
|
|
|
|
+ SuyuApplication.documentsTree!!.openContentUri(path, openmode)
|
|
|
} else {
|
|
} else {
|
|
|
FileUtil.openContentUri(path, openmode)
|
|
FileUtil.openContentUri(path, openmode)
|
|
|
}
|
|
}
|
|
@@ -52,7 +52,7 @@ object NativeLibrary {
|
|
|
@JvmStatic
|
|
@JvmStatic
|
|
|
fun getSize(path: String?): Long {
|
|
fun getSize(path: String?): Long {
|
|
|
return if (DocumentsTree.isNativePath(path!!)) {
|
|
return if (DocumentsTree.isNativePath(path!!)) {
|
|
|
- YuzuApplication.documentsTree!!.getFileSize(path)
|
|
|
|
|
|
|
+ SuyuApplication.documentsTree!!.getFileSize(path)
|
|
|
} else {
|
|
} else {
|
|
|
FileUtil.getFileSize(path)
|
|
FileUtil.getFileSize(path)
|
|
|
}
|
|
}
|
|
@@ -62,7 +62,7 @@ object NativeLibrary {
|
|
|
@JvmStatic
|
|
@JvmStatic
|
|
|
fun exists(path: String?): Boolean {
|
|
fun exists(path: String?): Boolean {
|
|
|
return if (DocumentsTree.isNativePath(path!!)) {
|
|
return if (DocumentsTree.isNativePath(path!!)) {
|
|
|
- YuzuApplication.documentsTree!!.exists(path)
|
|
|
|
|
|
|
+ SuyuApplication.documentsTree!!.exists(path)
|
|
|
} else {
|
|
} else {
|
|
|
FileUtil.exists(path, suppressLog = true)
|
|
FileUtil.exists(path, suppressLog = true)
|
|
|
}
|
|
}
|
|
@@ -72,7 +72,7 @@ object NativeLibrary {
|
|
|
@JvmStatic
|
|
@JvmStatic
|
|
|
fun isDirectory(path: String?): Boolean {
|
|
fun isDirectory(path: String?): Boolean {
|
|
|
return if (DocumentsTree.isNativePath(path!!)) {
|
|
return if (DocumentsTree.isNativePath(path!!)) {
|
|
|
- YuzuApplication.documentsTree!!.isDirectory(path)
|
|
|
|
|
|
|
+ SuyuApplication.documentsTree!!.isDirectory(path)
|
|
|
} else {
|
|
} else {
|
|
|
FileUtil.isDirectory(path)
|
|
FileUtil.isDirectory(path)
|
|
|
}
|
|
}
|
|
@@ -82,7 +82,7 @@ object NativeLibrary {
|
|
|
@JvmStatic
|
|
@JvmStatic
|
|
|
fun getParentDirectory(path: String): String =
|
|
fun getParentDirectory(path: String): String =
|
|
|
if (DocumentsTree.isNativePath(path)) {
|
|
if (DocumentsTree.isNativePath(path)) {
|
|
|
- YuzuApplication.documentsTree!!.getParentDirectory(path)
|
|
|
|
|
|
|
+ SuyuApplication.documentsTree!!.getParentDirectory(path)
|
|
|
} else {
|
|
} else {
|
|
|
path
|
|
path
|
|
|
}
|
|
}
|
|
@@ -91,7 +91,7 @@ object NativeLibrary {
|
|
|
@JvmStatic
|
|
@JvmStatic
|
|
|
fun getFilename(path: String): String =
|
|
fun getFilename(path: String): String =
|
|
|
if (DocumentsTree.isNativePath(path)) {
|
|
if (DocumentsTree.isNativePath(path)) {
|
|
|
- YuzuApplication.documentsTree!!.getFilename(path)
|
|
|
|
|
|
|
+ SuyuApplication.documentsTree!!.getFilename(path)
|
|
|
} else {
|
|
} else {
|
|
|
FileUtil.getFilename(Uri.parse(path))
|
|
FileUtil.getFilename(Uri.parse(path))
|
|
|
}
|
|
}
|
|
@@ -326,7 +326,7 @@ object NativeLibrary {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * Logs the Yuzu version, Android version and, CPU.
|
|
|
|
|
|
|
+ * Logs the Suyu version, Android version and, CPU.
|
|
|
*/
|
|
*/
|
|
|
external fun logDeviceInfo()
|
|
external fun logDeviceInfo()
|
|
|
|
|
|