forked from suyu/suyu
Android Rebrand with working build
This commit is contained in:
parent
b2b769e45b
commit
c41d9d62a3
248 changed files with 2080 additions and 2067 deletions
2
src/android/.gitignore
vendored
2
src/android/.gitignore
vendored
|
@ -1,4 +1,4 @@
|
|||
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
# SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Built application files
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
|
@ -25,7 +25,7 @@ val autoVersion = (((System.currentTimeMillis() / 1000) - 1451606400) / 10).toIn
|
|||
|
||||
@Suppress("UnstableApiUsage")
|
||||
android {
|
||||
namespace = "org.yuzu.yuzu_emu"
|
||||
namespace = "org.suyu.suyu_emu"
|
||||
|
||||
compileSdkVersion = "android-34"
|
||||
ndkVersion = "26.1.10909125"
|
||||
|
@ -54,7 +54,7 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
// TODO If this is ever modified, change application_id in strings.xml
|
||||
applicationId = "org.yuzu.yuzu_emu"
|
||||
applicationId = "org.suyu.suyu_emu"
|
||||
minSdk = 30
|
||||
targetSdk = 34
|
||||
versionName = getGitVersion()
|
||||
|
@ -103,7 +103,7 @@ android {
|
|||
signingConfigs.getByName("default")
|
||||
}
|
||||
|
||||
resValue("string", "app_name_suffixed", "yuzu")
|
||||
resValue("string", "app_name_suffixed", "suyu")
|
||||
isMinifyEnabled = true
|
||||
isDebuggable = false
|
||||
proguardFiles(
|
||||
|
@ -116,7 +116,7 @@ android {
|
|||
// Attaches 'debug' suffix to version and package name, allowing installation alongside the release build.
|
||||
register("relWithDebInfo") {
|
||||
isDefault = true
|
||||
resValue("string", "app_name_suffixed", "yuzu Debug Release")
|
||||
resValue("string", "app_name_suffixed", "suyu Debug Release")
|
||||
signingConfig = signingConfigs.getByName("default")
|
||||
isMinifyEnabled = true
|
||||
isDebuggable = true
|
||||
|
@ -133,7 +133,7 @@ android {
|
|||
// Attaches 'debug' suffix to version and package name, allowing installation alongside the release build.
|
||||
debug {
|
||||
signingConfig = signingConfigs.getByName("default")
|
||||
resValue("string", "app_name_suffixed", "yuzu Debug")
|
||||
resValue("string", "app_name_suffixed", "suyu Debug")
|
||||
isDebuggable = true
|
||||
isJniDebuggable = true
|
||||
versionNameSuffix = "-debug"
|
||||
|
|
2
src/android/app/proguard-rules.pro
vendored
2
src/android/app/proguard-rules.pro
vendored
|
@ -1,4 +1,4 @@
|
|||
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
# SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# To get usable stack traces
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
|
@ -17,7 +17,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
|
||||
<application
|
||||
android:name="org.yuzu.yuzu_emu.YuzuApplication"
|
||||
android:name="org.suyu.suyu_emu.SuyuApplication"
|
||||
android:label="@string/app_name_suffixed"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:allowBackup="true"
|
||||
|
@ -34,9 +34,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
android:resource="@xml/game_mode_config" />
|
||||
|
||||
<activity
|
||||
android:name="org.yuzu.yuzu_emu.ui.main.MainActivity"
|
||||
android:name="org.suyu.suyu_emu.ui.main.MainActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.Yuzu.Splash.Main">
|
||||
android:theme="@style/Theme.Suyu.Splash.Main">
|
||||
|
||||
<!-- This intentfilter marks this Activity as the one that gets launched from Home screen. -->
|
||||
<intent-filter>
|
||||
|
@ -48,13 +48,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="org.yuzu.yuzu_emu.features.settings.ui.SettingsActivity"
|
||||
android:theme="@style/Theme.Yuzu.Main"
|
||||
android:name="org.suyu.suyu_emu.features.settings.ui.SettingsActivity"
|
||||
android:theme="@style/Theme.Suyu.Main"
|
||||
android:label="@string/preferences_settings"/>
|
||||
|
||||
<activity
|
||||
android:name="org.yuzu.yuzu_emu.activities.EmulationActivity"
|
||||
android:theme="@style/Theme.Yuzu.Main"
|
||||
android:name="org.suyu.suyu_emu.activities.EmulationActivity"
|
||||
android:theme="@style/Theme.Suyu.Main"
|
||||
android:launchMode="singleTop"
|
||||
android:supportsPictureInPicture="true"
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|uiMode"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu
|
||||
package org.suyu.suyu_emu
|
||||
|
||||
import android.content.DialogInterface
|
||||
import android.net.Uri
|
||||
|
@ -13,18 +13,18 @@ import android.widget.TextView
|
|||
import androidx.annotation.Keep
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
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
|
||||
* with the native side of the Yuzu code.
|
||||
* with the native side of the Suyu code.
|
||||
*/
|
||||
object NativeLibrary {
|
||||
@JvmField
|
||||
|
@ -32,7 +32,7 @@ object NativeLibrary {
|
|||
|
||||
init {
|
||||
try {
|
||||
System.loadLibrary("yuzu-android")
|
||||
System.loadLibrary("suyu-android")
|
||||
} catch (ex: UnsatisfiedLinkError) {
|
||||
error("[NativeLibrary] $ex")
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ object NativeLibrary {
|
|||
@JvmStatic
|
||||
fun openContentUri(path: String?, openmode: String?): Int {
|
||||
return if (DocumentsTree.isNativePath(path!!)) {
|
||||
YuzuApplication.documentsTree!!.openContentUri(path, openmode)
|
||||
SuyuApplication.documentsTree!!.openContentUri(path, openmode)
|
||||
} else {
|
||||
FileUtil.openContentUri(path, openmode)
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ object NativeLibrary {
|
|||
@JvmStatic
|
||||
fun getSize(path: String?): Long {
|
||||
return if (DocumentsTree.isNativePath(path!!)) {
|
||||
YuzuApplication.documentsTree!!.getFileSize(path)
|
||||
SuyuApplication.documentsTree!!.getFileSize(path)
|
||||
} else {
|
||||
FileUtil.getFileSize(path)
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ object NativeLibrary {
|
|||
@JvmStatic
|
||||
fun exists(path: String?): Boolean {
|
||||
return if (DocumentsTree.isNativePath(path!!)) {
|
||||
YuzuApplication.documentsTree!!.exists(path)
|
||||
SuyuApplication.documentsTree!!.exists(path)
|
||||
} else {
|
||||
FileUtil.exists(path, suppressLog = true)
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ object NativeLibrary {
|
|||
@JvmStatic
|
||||
fun isDirectory(path: String?): Boolean {
|
||||
return if (DocumentsTree.isNativePath(path!!)) {
|
||||
YuzuApplication.documentsTree!!.isDirectory(path)
|
||||
SuyuApplication.documentsTree!!.isDirectory(path)
|
||||
} else {
|
||||
FileUtil.isDirectory(path)
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ object NativeLibrary {
|
|||
@JvmStatic
|
||||
fun getParentDirectory(path: String): String =
|
||||
if (DocumentsTree.isNativePath(path)) {
|
||||
YuzuApplication.documentsTree!!.getParentDirectory(path)
|
||||
SuyuApplication.documentsTree!!.getParentDirectory(path)
|
||||
} else {
|
||||
path
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ object NativeLibrary {
|
|||
@JvmStatic
|
||||
fun getFilename(path: String): String =
|
||||
if (DocumentsTree.isNativePath(path)) {
|
||||
YuzuApplication.documentsTree!!.getFilename(path)
|
||||
SuyuApplication.documentsTree!!.getFilename(path)
|
||||
} else {
|
||||
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()
|
||||
|
|
@ -1,22 +1,22 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu
|
||||
package org.suyu.suyu_emu
|
||||
|
||||
import android.app.Application
|
||||
import android.app.NotificationChannel
|
||||
import android.app.NotificationManager
|
||||
import android.content.Context
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import java.io.File
|
||||
import org.yuzu.yuzu_emu.utils.DirectoryInitialization
|
||||
import org.yuzu.yuzu_emu.utils.DocumentsTree
|
||||
import org.yuzu.yuzu_emu.utils.GpuDriverHelper
|
||||
import org.yuzu.yuzu_emu.utils.Log
|
||||
import org.suyu.suyu_emu.utils.DirectoryInitialization
|
||||
import org.suyu.suyu_emu.utils.DocumentsTree
|
||||
import org.suyu.suyu_emu.utils.GpuDriverHelper
|
||||
import org.suyu.suyu_emu.utils.Log
|
||||
|
||||
fun Context.getPublicFilesDir(): File = getExternalFilesDir(null) ?: filesDir
|
||||
|
||||
class YuzuApplication : Application() {
|
||||
class SuyuApplication : Application() {
|
||||
private fun createNotificationChannels() {
|
||||
val noticeChannel = NotificationChannel(
|
||||
getString(R.string.notice_notification_channel_id),
|
||||
|
@ -47,7 +47,7 @@ class YuzuApplication : Application() {
|
|||
|
||||
companion object {
|
||||
var documentsTree: DocumentsTree? = null
|
||||
lateinit var application: YuzuApplication
|
||||
lateinit var application: SuyuApplication
|
||||
|
||||
val appContext: Context
|
||||
get() = application.applicationContext
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.activities
|
||||
package org.suyu.suyu_emu.activities
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.PendingIntent
|
||||
|
@ -35,23 +35,23 @@ import androidx.core.view.WindowInsetsCompat
|
|||
import androidx.core.view.WindowInsetsControllerCompat
|
||||
import androidx.navigation.fragment.NavHostFragment
|
||||
import androidx.preference.PreferenceManager
|
||||
import org.yuzu.yuzu_emu.NativeLibrary
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.databinding.ActivityEmulationBinding
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.IntSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.Settings
|
||||
import org.yuzu.yuzu_emu.model.EmulationViewModel
|
||||
import org.yuzu.yuzu_emu.model.Game
|
||||
import org.yuzu.yuzu_emu.utils.InputHandler
|
||||
import org.yuzu.yuzu_emu.utils.Log
|
||||
import org.yuzu.yuzu_emu.utils.MemoryUtil
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.yuzu.yuzu_emu.utils.NfcReader
|
||||
import org.yuzu.yuzu_emu.utils.ParamPackage
|
||||
import org.yuzu.yuzu_emu.utils.ThemeHelper
|
||||
import org.suyu.suyu_emu.NativeLibrary
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.databinding.ActivityEmulationBinding
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.features.settings.model.BooleanSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.IntSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.Settings
|
||||
import org.suyu.suyu_emu.model.EmulationViewModel
|
||||
import org.suyu.suyu_emu.model.Game
|
||||
import org.suyu.suyu_emu.utils.InputHandler
|
||||
import org.suyu.suyu_emu.utils.Log
|
||||
import org.suyu.suyu_emu.utils.MemoryUtil
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.utils.NfcReader
|
||||
import org.suyu.suyu_emu.utils.ParamPackage
|
||||
import org.suyu.suyu_emu.utils.ThemeHelper
|
||||
import java.text.NumberFormat
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
|
@ -123,7 +123,7 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener {
|
|||
nfcReader = NfcReader(this)
|
||||
nfcReader.initialize()
|
||||
|
||||
val preferences = PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext)
|
||||
val preferences = PreferenceManager.getDefaultSharedPreferences(SuyuApplication.appContext)
|
||||
if (!preferences.getBoolean(Settings.PREF_MEMORY_WARNING_SHOWN, false)) {
|
||||
if (MemoryUtil.isLessThan(MemoryUtil.REQUIRED_MEMORY, MemoryUtil.totalMemory)) {
|
||||
Toast.makeText(
|
|
@ -1,13 +1,13 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
package org.suyu.suyu_emu.adapters
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import androidx.recyclerview.widget.AsyncDifferConfig
|
||||
import androidx.recyclerview.widget.DiffUtil
|
||||
import androidx.recyclerview.widget.ListAdapter
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
/**
|
|
@ -1,11 +1,11 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
package org.suyu.suyu_emu.adapters
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
/**
|
||||
* Generic list class meant to take care of basic lists
|
|
@ -1,10 +1,10 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
package org.suyu.suyu_emu.adapters
|
||||
|
||||
import org.yuzu.yuzu_emu.model.SelectableItem
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import org.suyu.suyu_emu.model.SelectableItem
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
/**
|
||||
* Generic list class meant to take care of single selection UI updates
|
|
@ -1,14 +1,14 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
package org.suyu.suyu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemAddonBinding
|
||||
import org.yuzu.yuzu_emu.model.Patch
|
||||
import org.yuzu.yuzu_emu.model.AddonViewModel
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import org.suyu.suyu_emu.databinding.ListItemAddonBinding
|
||||
import org.suyu.suyu_emu.model.Patch
|
||||
import org.suyu.suyu_emu.model.AddonViewModel
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class AddonAdapter(val addonViewModel: AddonViewModel) :
|
||||
AbstractDiffAdapter<Patch, AddonAdapter.AddonViewHolder>() {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
package org.suyu.suyu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
|
@ -9,15 +9,15 @@ import android.widget.Toast
|
|||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.navigation.findNavController
|
||||
import org.yuzu.yuzu_emu.HomeNavigationDirections
|
||||
import org.yuzu.yuzu_emu.NativeLibrary
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.databinding.CardSimpleOutlinedBinding
|
||||
import org.yuzu.yuzu_emu.model.Applet
|
||||
import org.yuzu.yuzu_emu.model.AppletInfo
|
||||
import org.yuzu.yuzu_emu.model.Game
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import org.suyu.suyu_emu.HomeNavigationDirections
|
||||
import org.suyu.suyu_emu.NativeLibrary
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.databinding.CardSimpleOutlinedBinding
|
||||
import org.suyu.suyu_emu.model.Applet
|
||||
import org.suyu.suyu_emu.model.AppletInfo
|
||||
import org.suyu.suyu_emu.model.Game
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class AppletAdapter(val activity: FragmentActivity, applets: List<Applet>) :
|
||||
AbstractListAdapter<Applet, AppletAdapter.AppletViewHolder>(applets) {
|
||||
|
@ -64,7 +64,7 @@ class AppletAdapter(val activity: FragmentActivity, applets: List<Applet>) :
|
|||
|
||||
NativeLibrary.setCurrentAppletId(applet.appletInfo.appletId)
|
||||
val appletGame = Game(
|
||||
title = YuzuApplication.appContext.getString(applet.titleId),
|
||||
title = SuyuApplication.appContext.getString(applet.titleId),
|
||||
path = appletPath
|
||||
)
|
||||
val action = HomeNavigationDirections.actionGlobalEmulationActivity(appletGame)
|
|
@ -1,23 +1,23 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
package org.suyu.suyu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import org.yuzu.yuzu_emu.HomeNavigationDirections
|
||||
import org.yuzu.yuzu_emu.NativeLibrary
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.databinding.DialogListItemBinding
|
||||
import org.yuzu.yuzu_emu.model.CabinetMode
|
||||
import org.yuzu.yuzu_emu.adapters.CabinetLauncherDialogAdapter.CabinetModeViewHolder
|
||||
import org.yuzu.yuzu_emu.model.AppletInfo
|
||||
import org.yuzu.yuzu_emu.model.Game
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import org.suyu.suyu_emu.HomeNavigationDirections
|
||||
import org.suyu.suyu_emu.NativeLibrary
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.databinding.DialogListItemBinding
|
||||
import org.suyu.suyu_emu.model.CabinetMode
|
||||
import org.suyu.suyu_emu.adapters.CabinetLauncherDialogAdapter.CabinetModeViewHolder
|
||||
import org.suyu.suyu_emu.model.AppletInfo
|
||||
import org.suyu.suyu_emu.model.Game
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class CabinetLauncherDialogAdapter(val fragment: Fragment) :
|
||||
AbstractListAdapter<CabinetMode, CabinetModeViewHolder>(
|
||||
|
@ -49,7 +49,7 @@ class CabinetLauncherDialogAdapter(val fragment: Fragment) :
|
|||
NativeLibrary.setCurrentAppletId(AppletInfo.Cabinet.appletId)
|
||||
NativeLibrary.setCabinetMode(mode.id)
|
||||
val appletGame = Game(
|
||||
title = YuzuApplication.appContext.getString(R.string.cabinet_applet),
|
||||
title = SuyuApplication.appContext.getString(R.string.cabinet_applet),
|
||||
path = appletPath
|
||||
)
|
||||
val action = HomeNavigationDirections.actionGlobalEmulationActivity(appletGame)
|
|
@ -1,18 +1,18 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
package org.suyu.suyu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.databinding.CardDriverOptionBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.StringSetting
|
||||
import org.yuzu.yuzu_emu.model.Driver
|
||||
import org.yuzu.yuzu_emu.model.DriverViewModel
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.marquee
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.databinding.CardDriverOptionBinding
|
||||
import org.suyu.suyu_emu.features.settings.model.StringSetting
|
||||
import org.suyu.suyu_emu.model.Driver
|
||||
import org.suyu.suyu_emu.model.DriverViewModel
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.marquee
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class DriverAdapter(private val driverViewModel: DriverViewModel) :
|
||||
AbstractSingleSelectionList<Driver, DriverAdapter.DriverViewHolder>(
|
|
@ -1,18 +1,18 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
package org.suyu.suyu_emu.adapters
|
||||
|
||||
import android.net.Uri
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import org.yuzu.yuzu_emu.databinding.CardFolderBinding
|
||||
import org.yuzu.yuzu_emu.fragments.GameFolderPropertiesDialogFragment
|
||||
import org.yuzu.yuzu_emu.model.GameDir
|
||||
import org.yuzu.yuzu_emu.model.GamesViewModel
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.marquee
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import org.suyu.suyu_emu.databinding.CardFolderBinding
|
||||
import org.suyu.suyu_emu.fragments.GameFolderPropertiesDialogFragment
|
||||
import org.suyu.suyu_emu.model.GameDir
|
||||
import org.suyu.suyu_emu.model.GamesViewModel
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.marquee
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class FolderAdapter(val activity: FragmentActivity, val gamesViewModel: GamesViewModel) :
|
||||
AbstractDiffAdapter<GameDir, FolderAdapter.FolderViewHolder>() {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
package org.suyu.suyu_emu.adapters
|
||||
|
||||
import android.net.Uri
|
||||
import android.view.LayoutInflater
|
||||
|
@ -19,15 +19,15 @@ import androidx.preference.PreferenceManager
|
|||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.yuzu.yuzu_emu.HomeNavigationDirections
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.databinding.CardGameBinding
|
||||
import org.yuzu.yuzu_emu.model.Game
|
||||
import org.yuzu.yuzu_emu.model.GamesViewModel
|
||||
import org.yuzu.yuzu_emu.utils.GameIconUtils
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.marquee
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import org.suyu.suyu_emu.HomeNavigationDirections
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.databinding.CardGameBinding
|
||||
import org.suyu.suyu_emu.model.Game
|
||||
import org.suyu.suyu_emu.model.GamesViewModel
|
||||
import org.suyu.suyu_emu.utils.GameIconUtils
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.marquee
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class GameAdapter(private val activity: AppCompatActivity) :
|
||||
AbstractDiffAdapter<Game, GameAdapter.GameViewHolder>(exact = false) {
|
||||
|
@ -51,12 +51,12 @@ class GameAdapter(private val activity: AppCompatActivity) :
|
|||
|
||||
fun onClick(game: Game) {
|
||||
val gameExists = DocumentFile.fromSingleUri(
|
||||
YuzuApplication.appContext,
|
||||
SuyuApplication.appContext,
|
||||
Uri.parse(game.path)
|
||||
)?.exists() == true
|
||||
if (!gameExists) {
|
||||
Toast.makeText(
|
||||
YuzuApplication.appContext,
|
||||
SuyuApplication.appContext,
|
||||
R.string.loader_error_file_not_found,
|
||||
Toast.LENGTH_LONG
|
||||
).show()
|
||||
|
@ -66,7 +66,7 @@ class GameAdapter(private val activity: AppCompatActivity) :
|
|||
}
|
||||
|
||||
val preferences =
|
||||
PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext)
|
||||
PreferenceManager.getDefaultSharedPreferences(SuyuApplication.appContext)
|
||||
preferences.edit()
|
||||
.putLong(
|
||||
game.keyLastPlayedTime,
|
||||
|
@ -77,12 +77,12 @@ class GameAdapter(private val activity: AppCompatActivity) :
|
|||
activity.lifecycleScope.launch {
|
||||
withContext(Dispatchers.IO) {
|
||||
val shortcut =
|
||||
ShortcutInfoCompat.Builder(YuzuApplication.appContext, game.path)
|
||||
ShortcutInfoCompat.Builder(SuyuApplication.appContext, game.path)
|
||||
.setShortLabel(game.title)
|
||||
.setIcon(GameIconUtils.getShortcutIcon(activity, game))
|
||||
.setIntent(game.launchIntent)
|
||||
.build()
|
||||
ShortcutManagerCompat.pushDynamicShortcut(YuzuApplication.appContext, shortcut)
|
||||
ShortcutManagerCompat.pushDynamicShortcut(SuyuApplication.appContext, shortcut)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +1,21 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
package org.suyu.suyu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import org.yuzu.yuzu_emu.databinding.CardInstallableIconBinding
|
||||
import org.yuzu.yuzu_emu.databinding.CardSimpleOutlinedBinding
|
||||
import org.yuzu.yuzu_emu.model.GameProperty
|
||||
import org.yuzu.yuzu_emu.model.InstallableProperty
|
||||
import org.yuzu.yuzu_emu.model.SubmenuProperty
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.marquee
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.yuzu.yuzu_emu.utils.collect
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import org.suyu.suyu_emu.databinding.CardInstallableIconBinding
|
||||
import org.suyu.suyu_emu.databinding.CardSimpleOutlinedBinding
|
||||
import org.suyu.suyu_emu.model.GameProperty
|
||||
import org.suyu.suyu_emu.model.InstallableProperty
|
||||
import org.suyu.suyu_emu.model.SubmenuProperty
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.marquee
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.utils.collect
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class GamePropertiesAdapter(
|
||||
private val viewLifecycle: LifecycleOwner,
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
package org.suyu.suyu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
|
@ -9,14 +9,14 @@ import androidx.appcompat.app.AppCompatActivity
|
|||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.databinding.CardHomeOptionBinding
|
||||
import org.yuzu.yuzu_emu.fragments.MessageDialogFragment
|
||||
import org.yuzu.yuzu_emu.model.HomeSetting
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.marquee
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.yuzu.yuzu_emu.utils.collect
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.databinding.CardHomeOptionBinding
|
||||
import org.suyu.suyu_emu.fragments.MessageDialogFragment
|
||||
import org.suyu.suyu_emu.model.HomeSetting
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.marquee
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.utils.collect
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class HomeSettingAdapter(
|
||||
private val activity: AppCompatActivity,
|
|
@ -1,14 +1,14 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
package org.suyu.suyu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import org.yuzu.yuzu_emu.databinding.CardInstallableBinding
|
||||
import org.yuzu.yuzu_emu.model.Installable
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import org.suyu.suyu_emu.databinding.CardInstallableBinding
|
||||
import org.suyu.suyu_emu.model.Installable
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class InstallableAdapter(installables: List<Installable>) :
|
||||
AbstractListAdapter<Installable, InstallableAdapter.InstallableViewHolder>(installables) {
|
|
@ -1,16 +1,16 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
package org.suyu.suyu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding
|
||||
import org.yuzu.yuzu_emu.fragments.LicenseBottomSheetDialogFragment
|
||||
import org.yuzu.yuzu_emu.model.License
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingBinding
|
||||
import org.suyu.suyu_emu.fragments.LicenseBottomSheetDialogFragment
|
||||
import org.suyu.suyu_emu.model.License
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class LicenseAdapter(private val activity: AppCompatActivity, licenses: List<License>) :
|
||||
AbstractListAdapter<License, LicenseAdapter.LicenseViewHolder>(licenses) {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
package org.suyu.suyu_emu.adapters
|
||||
|
||||
import android.text.Html
|
||||
import android.view.LayoutInflater
|
||||
|
@ -10,14 +10,14 @@ import androidx.appcompat.app.AppCompatActivity
|
|||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import org.yuzu.yuzu_emu.databinding.PageSetupBinding
|
||||
import org.yuzu.yuzu_emu.model.HomeViewModel
|
||||
import org.yuzu.yuzu_emu.model.SetupCallback
|
||||
import org.yuzu.yuzu_emu.model.SetupPage
|
||||
import org.yuzu.yuzu_emu.model.StepState
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import org.suyu.suyu_emu.databinding.PageSetupBinding
|
||||
import org.suyu.suyu_emu.model.HomeViewModel
|
||||
import org.suyu.suyu_emu.model.SetupCallback
|
||||
import org.suyu.suyu_emu.model.SetupPage
|
||||
import org.suyu.suyu_emu.model.StepState
|
||||
import org.suyu.suyu_emu.utils.ViewUtils
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class SetupAdapter(val activity: AppCompatActivity, pages: List<SetupPage>) :
|
||||
AbstractListAdapter<SetupPage, SetupAdapter.SetupPageViewHolder>(pages) {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.applets.keyboard
|
||||
package org.suyu.suyu_emu.applets.keyboard
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
|
@ -13,9 +13,9 @@ import android.view.inputmethod.InputMethodManager
|
|||
import androidx.annotation.Keep
|
||||
import androidx.core.view.ViewCompat
|
||||
import java.io.Serializable
|
||||
import org.yuzu.yuzu_emu.NativeLibrary
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.applets.keyboard.ui.KeyboardDialogFragment
|
||||
import org.suyu.suyu_emu.NativeLibrary
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.applets.keyboard.ui.KeyboardDialogFragment
|
||||
|
||||
@Keep
|
||||
object SoftwareKeyboard {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.applets.keyboard.ui
|
||||
package org.suyu.suyu_emu.applets.keyboard.ui
|
||||
|
||||
import android.app.Dialog
|
||||
import android.content.DialogInterface
|
||||
|
@ -10,11 +10,11 @@ import android.text.InputFilter
|
|||
import android.text.InputType
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.applets.keyboard.SoftwareKeyboard
|
||||
import org.yuzu.yuzu_emu.applets.keyboard.SoftwareKeyboard.KeyboardConfig
|
||||
import org.yuzu.yuzu_emu.databinding.DialogEditTextBinding
|
||||
import org.yuzu.yuzu_emu.utils.SerializableHelper.serializable
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.applets.keyboard.SoftwareKeyboard
|
||||
import org.suyu.suyu_emu.applets.keyboard.SoftwareKeyboard.KeyboardConfig
|
||||
import org.suyu.suyu_emu.databinding.DialogEditTextBinding
|
||||
import org.suyu.suyu_emu.utils.SerializableHelper.serializable
|
||||
|
||||
class KeyboardDialogFragment : DialogFragment() {
|
||||
private lateinit var binding: DialogEditTextBinding
|
|
@ -1,15 +1,15 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.disk_shader_cache
|
||||
package org.suyu.suyu_emu.disk_shader_cache
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import org.yuzu.yuzu_emu.NativeLibrary
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.activities.EmulationActivity
|
||||
import org.yuzu.yuzu_emu.model.EmulationViewModel
|
||||
import org.yuzu.yuzu_emu.utils.Log
|
||||
import org.suyu.suyu_emu.NativeLibrary
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.activities.EmulationActivity
|
||||
import org.suyu.suyu_emu.model.EmulationViewModel
|
||||
import org.suyu.suyu_emu.utils.Log
|
||||
|
||||
@Keep
|
||||
object DiskShaderCacheProgress {
|
|
@ -1,10 +1,10 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright © 2023 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
|
||||
package org.yuzu.yuzu_emu.features
|
||||
package org.suyu.suyu_emu.features
|
||||
|
||||
import android.database.Cursor
|
||||
import android.database.MatrixCursor
|
||||
|
@ -14,14 +14,14 @@ import android.provider.DocumentsContract
|
|||
import android.provider.DocumentsProvider
|
||||
import android.webkit.MimeTypeMap
|
||||
import java.io.*
|
||||
import org.yuzu.yuzu_emu.BuildConfig
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.getPublicFilesDir
|
||||
import org.suyu.suyu_emu.BuildConfig
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.getPublicFilesDir
|
||||
|
||||
class DocumentProvider : DocumentsProvider() {
|
||||
private val baseDirectory: File
|
||||
get() = File(YuzuApplication.application.getPublicFilesDir().canonicalPath)
|
||||
get() = File(SuyuApplication.application.getPublicFilesDir().canonicalPath)
|
||||
|
||||
companion object {
|
||||
private val DEFAULT_ROOT_PROJECTION: Array<String> = arrayOf(
|
||||
|
@ -91,7 +91,7 @@ class DocumentProvider : DocumentsProvider() {
|
|||
add(DocumentsContract.Root.COLUMN_DOCUMENT_ID, getDocumentId(baseDirectory))
|
||||
add(DocumentsContract.Root.COLUMN_MIME_TYPES, "*/*")
|
||||
add(DocumentsContract.Root.COLUMN_AVAILABLE_BYTES, baseDirectory.freeSpace)
|
||||
add(DocumentsContract.Root.COLUMN_ICON, R.drawable.ic_yuzu)
|
||||
add(DocumentsContract.Root.COLUMN_ICON, R.drawable.ic_suyu)
|
||||
}
|
||||
|
||||
return cursor
|
||||
|
@ -288,7 +288,7 @@ class DocumentProvider : DocumentsProvider() {
|
|||
add(DocumentsContract.Document.COLUMN_LAST_MODIFIED, localFile.lastModified())
|
||||
add(DocumentsContract.Document.COLUMN_FLAGS, flags)
|
||||
if (localFile == baseDirectory) {
|
||||
add(DocumentsContract.Root.COLUMN_ICON, R.drawable.ic_yuzu)
|
||||
add(DocumentsContract.Root.COLUMN_ICON, R.drawable.ic_suyu)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.input
|
||||
package org.suyu.suyu_emu.features.input
|
||||
|
||||
import org.yuzu.yuzu_emu.features.input.model.NativeButton
|
||||
import org.yuzu.yuzu_emu.features.input.model.NativeAnalog
|
||||
import org.yuzu.yuzu_emu.features.input.model.InputType
|
||||
import org.yuzu.yuzu_emu.features.input.model.ButtonName
|
||||
import org.yuzu.yuzu_emu.features.input.model.NpadStyleIndex
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.yuzu.yuzu_emu.utils.ParamPackage
|
||||
import org.suyu.suyu_emu.features.input.model.NativeButton
|
||||
import org.suyu.suyu_emu.features.input.model.NativeAnalog
|
||||
import org.suyu.suyu_emu.features.input.model.InputType
|
||||
import org.suyu.suyu_emu.features.input.model.ButtonName
|
||||
import org.suyu.suyu_emu.features.input.model.NpadStyleIndex
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.utils.ParamPackage
|
||||
import android.view.InputDevice
|
||||
|
||||
object NativeInput {
|
||||
|
@ -177,9 +177,9 @@ object NativeInput {
|
|||
|
||||
/**
|
||||
* Registers a controller to be used with mapping
|
||||
* @param device An [InputDevice] or the input overlay wrapped with [YuzuInputDevice]
|
||||
* @param device An [InputDevice] or the input overlay wrapped with [SuyuInputDevice]
|
||||
*/
|
||||
external fun registerController(device: YuzuInputDevice)
|
||||
external fun registerController(device: SuyuInputDevice)
|
||||
|
||||
/**
|
||||
* Gets the names of input devices that have been registered with the input subsystem via [registerController]
|
|
@ -1,16 +1,16 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.input
|
||||
package org.suyu.suyu_emu.features.input
|
||||
|
||||
import android.view.InputDevice
|
||||
import androidx.annotation.Keep
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.utils.InputHandler.getGUID
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.utils.InputHandler.getGUID
|
||||
|
||||
@Keep
|
||||
interface YuzuInputDevice {
|
||||
interface SuyuInputDevice {
|
||||
fun getName(): String
|
||||
|
||||
fun getGUID(): String
|
||||
|
@ -25,15 +25,15 @@ interface YuzuInputDevice {
|
|||
fun hasKeys(keys: IntArray): BooleanArray = BooleanArray(0)
|
||||
}
|
||||
|
||||
class YuzuPhysicalDevice(
|
||||
class SuyuPhysicalDevice(
|
||||
private val device: InputDevice,
|
||||
private val port: Int,
|
||||
useSystemVibrator: Boolean
|
||||
) : YuzuInputDevice {
|
||||
) : SuyuInputDevice {
|
||||
private val vibrator = if (useSystemVibrator) {
|
||||
YuzuVibrator.getSystemVibrator()
|
||||
SuyuVibrator.getSystemVibrator()
|
||||
} else {
|
||||
YuzuVibrator.getControllerVibrator(device)
|
||||
SuyuVibrator.getControllerVibrator(device)
|
||||
}
|
||||
|
||||
override fun getName(): String {
|
||||
|
@ -60,14 +60,14 @@ class YuzuPhysicalDevice(
|
|||
override fun hasKeys(keys: IntArray): BooleanArray = device.hasKeys(*keys)
|
||||
}
|
||||
|
||||
class YuzuInputOverlayDevice(
|
||||
class SuyuInputOverlayDevice(
|
||||
private val vibration: Boolean,
|
||||
private val port: Int
|
||||
) : YuzuInputDevice {
|
||||
private val vibrator = YuzuVibrator.getSystemVibrator()
|
||||
) : SuyuInputDevice {
|
||||
private val vibrator = SuyuVibrator.getSystemVibrator()
|
||||
|
||||
override fun getName(): String {
|
||||
return YuzuApplication.appContext.getString(R.string.input_overlay)
|
||||
return SuyuApplication.appContext.getString(R.string.input_overlay)
|
||||
}
|
||||
|
||||
override fun getGUID(): String {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.input
|
||||
package org.suyu.suyu_emu.features.input
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
|
@ -12,32 +12,32 @@ import android.os.VibratorManager
|
|||
import android.view.InputDevice
|
||||
import androidx.annotation.Keep
|
||||
import androidx.annotation.RequiresApi
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
|
||||
@Keep
|
||||
@Suppress("DEPRECATION")
|
||||
interface YuzuVibrator {
|
||||
interface SuyuVibrator {
|
||||
fun supportsVibration(): Boolean
|
||||
|
||||
fun vibrate(intensity: Float)
|
||||
|
||||
companion object {
|
||||
fun getControllerVibrator(device: InputDevice): YuzuVibrator =
|
||||
fun getControllerVibrator(device: InputDevice): SuyuVibrator =
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
YuzuVibratorManager(device.vibratorManager)
|
||||
SuyuVibratorManager(device.vibratorManager)
|
||||
} else {
|
||||
YuzuVibratorManagerCompat(device.vibrator)
|
||||
SuyuVibratorManagerCompat(device.vibrator)
|
||||
}
|
||||
|
||||
fun getSystemVibrator(): YuzuVibrator =
|
||||
fun getSystemVibrator(): SuyuVibrator =
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
val vibratorManager = YuzuApplication.appContext
|
||||
val vibratorManager = SuyuApplication.appContext
|
||||
.getSystemService(Context.VIBRATOR_MANAGER_SERVICE) as VibratorManager
|
||||
YuzuVibratorManager(vibratorManager)
|
||||
SuyuVibratorManager(vibratorManager)
|
||||
} else {
|
||||
val vibrator = YuzuApplication.appContext
|
||||
val vibrator = SuyuApplication.appContext
|
||||
.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator
|
||||
YuzuVibratorManagerCompat(vibrator)
|
||||
SuyuVibratorManagerCompat(vibrator)
|
||||
}
|
||||
|
||||
fun getVibrationEffect(intensity: Float): VibrationEffect? {
|
||||
|
@ -53,24 +53,24 @@ interface YuzuVibrator {
|
|||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.S)
|
||||
class YuzuVibratorManager(private val vibratorManager: VibratorManager) : YuzuVibrator {
|
||||
class SuyuVibratorManager(private val vibratorManager: VibratorManager) : SuyuVibrator {
|
||||
override fun supportsVibration(): Boolean {
|
||||
return vibratorManager.vibratorIds.isNotEmpty()
|
||||
}
|
||||
|
||||
override fun vibrate(intensity: Float) {
|
||||
val vibration = YuzuVibrator.getVibrationEffect(intensity) ?: return
|
||||
val vibration = SuyuVibrator.getVibrationEffect(intensity) ?: return
|
||||
vibratorManager.vibrate(CombinedVibration.createParallel(vibration))
|
||||
}
|
||||
}
|
||||
|
||||
class YuzuVibratorManagerCompat(private val vibrator: Vibrator) : YuzuVibrator {
|
||||
class SuyuVibratorManagerCompat(private val vibrator: Vibrator) : SuyuVibrator {
|
||||
override fun supportsVibration(): Boolean {
|
||||
return vibrator.hasVibrator()
|
||||
}
|
||||
|
||||
override fun vibrate(intensity: Float) {
|
||||
val vibration = YuzuVibrator.getVibrationEffect(intensity) ?: return
|
||||
val vibration = SuyuVibrator.getVibrationEffect(intensity) ?: return
|
||||
vibrator.vibrate(vibration)
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.input.model
|
||||
package org.suyu.suyu_emu.features.input.model
|
||||
|
||||
enum class AnalogDirection(val int: Int, val param: String) {
|
||||
Up(0, "up"),
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.input.model
|
||||
package org.suyu.suyu_emu.features.input.model
|
||||
|
||||
// Loosely matches the enum in common/input.h
|
||||
enum class ButtonName(val int: Int) {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.input.model
|
||||
package org.suyu.suyu_emu.features.input.model
|
||||
|
||||
// Must match the corresponding enum in input_common/main.h
|
||||
enum class InputType(val int: Int) {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.input.model
|
||||
package org.suyu.suyu_emu.features.input.model
|
||||
|
||||
// Must match enum in src/common/settings_input.h
|
||||
enum class NativeAnalog(val int: Int) {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.input.model
|
||||
package org.suyu.suyu_emu.features.input.model
|
||||
|
||||
// Must match enum in src/common/settings_input.h
|
||||
enum class NativeButton(val int: Int) {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.input.model
|
||||
package org.suyu.suyu_emu.features.input.model
|
||||
|
||||
// Must match enum in src/common/settings_input.h
|
||||
enum class NativeTrigger(val int: Int) {
|
|
@ -1,10 +1,10 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.input.model
|
||||
package org.suyu.suyu_emu.features.input.model
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.suyu.suyu_emu.R
|
||||
|
||||
// Must match enum in src/core/hid/hid_types.h
|
||||
enum class NpadStyleIndex(val int: Int, @StringRes val nameId: Int = 0) {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.input.model
|
||||
package org.suyu.suyu_emu.features.input.model
|
||||
|
||||
import androidx.annotation.Keep
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
interface AbstractBooleanSetting : AbstractSetting {
|
||||
fun getBoolean(needsGlobal: Boolean = false): Boolean
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
interface AbstractByteSetting : AbstractSetting {
|
||||
fun getByte(needsGlobal: Boolean = false): Byte
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
interface AbstractFloatSetting : AbstractSetting {
|
||||
fun getFloat(needsGlobal: Boolean = false): Float
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
interface AbstractIntSetting : AbstractSetting {
|
||||
fun getInt(needsGlobal: Boolean = false): Int
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
interface AbstractLongSetting : AbstractSetting {
|
||||
fun getLong(needsGlobal: Boolean = false): Long
|
|
@ -1,9 +1,9 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
|
||||
interface AbstractSetting {
|
||||
val key: String
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
interface AbstractShortSetting : AbstractSetting {
|
||||
fun getShort(needsGlobal: Boolean = false): Short
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
interface AbstractStringSetting : AbstractSetting {
|
||||
fun getString(needsGlobal: Boolean = false): String
|
|
@ -1,9 +1,9 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
|
||||
enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
|
||||
AUDIO_MUTED("audio_muted"),
|
|
@ -1,9 +1,9 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
|
||||
enum class ByteSetting(override val key: String) : AbstractByteSetting {
|
||||
AUDIO_VOLUME("volume");
|
|
@ -1,9 +1,9 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
|
||||
enum class FloatSetting(override val key: String) : AbstractFloatSetting {
|
||||
// No float settings currently exist
|
|
@ -1,9 +1,9 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
|
||||
enum class IntSetting(override val key: String) : AbstractIntSetting {
|
||||
CPU_BACKEND("cpu_backend"),
|
|
@ -1,9 +1,9 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
|
||||
enum class LongSetting(override val key: String) : AbstractLongSetting {
|
||||
CUSTOM_RTC("custom_rtc");
|
|
@ -1,10 +1,10 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
|
||||
object Settings {
|
||||
enum class MenuTag(val titleId: Int = 0) {
|
||||
|
@ -26,7 +26,7 @@ object Settings {
|
|||
}
|
||||
|
||||
fun getPlayerString(player: Int): String =
|
||||
YuzuApplication.appContext.getString(R.string.preferences_player, player)
|
||||
SuyuApplication.appContext.getString(R.string.preferences_player, player)
|
||||
|
||||
const val PREF_FIRST_APP_LAUNCH = "FirstApplicationLaunch"
|
||||
const val PREF_MEMORY_WARNING_SHOWN = "MemoryWarningShown"
|
|
@ -1,9 +1,9 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
|
||||
enum class ShortSetting(override val key: String) : AbstractShortSetting {
|
||||
RENDERER_SPEED_LIMIT("speed_limit");
|
|
@ -1,9 +1,9 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model
|
||||
package org.suyu.suyu_emu.features.settings.model
|
||||
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
|
||||
enum class StringSetting(override val key: String) : AbstractStringSetting {
|
||||
DRIVER_PATH("driver_path"),
|
|
@ -1,14 +1,14 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.input.model.AnalogDirection
|
||||
import org.yuzu.yuzu_emu.features.input.model.InputType
|
||||
import org.yuzu.yuzu_emu.features.input.model.NativeAnalog
|
||||
import org.yuzu.yuzu_emu.utils.ParamPackage
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.features.input.model.AnalogDirection
|
||||
import org.suyu.suyu_emu.features.input.model.InputType
|
||||
import org.suyu.suyu_emu.features.input.model.NativeAnalog
|
||||
import org.suyu.suyu_emu.utils.ParamPackage
|
||||
|
||||
class AnalogInputSetting(
|
||||
override val playerIndex: Int,
|
|
@ -1,13 +1,13 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import org.yuzu.yuzu_emu.utils.ParamPackage
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.input.model.InputType
|
||||
import org.yuzu.yuzu_emu.features.input.model.NativeButton
|
||||
import org.suyu.suyu_emu.utils.ParamPackage
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.features.input.model.InputType
|
||||
import org.suyu.suyu_emu.features.input.model.NativeButton
|
||||
|
||||
class ButtonInputSetting(
|
||||
override val playerIndex: Int,
|
|
@ -1,10 +1,10 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractLongSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractLongSetting
|
||||
|
||||
class DateTimeSetting(
|
||||
private val longSetting: AbstractLongSetting,
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
|
||||
class InputProfileSetting(private val playerIndex: Int) :
|
||||
SettingsItem(emptySetting, R.string.profile, "", 0, "") {
|
|
@ -1,15 +1,15 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.input.model.ButtonName
|
||||
import org.yuzu.yuzu_emu.features.input.model.InputType
|
||||
import org.yuzu.yuzu_emu.utils.ParamPackage
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.features.input.model.ButtonName
|
||||
import org.suyu.suyu_emu.features.input.model.InputType
|
||||
import org.suyu.suyu_emu.utils.ParamPackage
|
||||
|
||||
sealed class InputSetting(
|
||||
@StringRes titleId: Int,
|
||||
|
@ -19,7 +19,7 @@ sealed class InputSetting(
|
|||
abstract val inputType: InputType
|
||||
abstract val playerIndex: Int
|
||||
|
||||
protected val context get() = YuzuApplication.appContext
|
||||
protected val context get() = SuyuApplication.appContext
|
||||
|
||||
abstract fun getSelectedValue(): String
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractIntSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractIntSetting
|
||||
|
||||
class IntSingleChoiceSetting(
|
||||
private val intSetting: AbstractIntSetting,
|
|
@ -1,13 +1,13 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.input.model.InputType
|
||||
import org.yuzu.yuzu_emu.features.input.model.NativeAnalog
|
||||
import org.yuzu.yuzu_emu.utils.ParamPackage
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.features.input.model.InputType
|
||||
import org.suyu.suyu_emu.features.input.model.NativeAnalog
|
||||
import org.suyu.suyu_emu.utils.ParamPackage
|
||||
|
||||
class ModifierInputSetting(
|
||||
override val playerIndex: Int,
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.StringRes
|
|
@ -1,23 +1,23 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import org.yuzu.yuzu_emu.NativeLibrary
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.input.model.NpadStyleIndex
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractBooleanSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.ByteSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.IntSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.LongSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.ShortSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.StringSetting
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.NativeLibrary
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.features.input.model.NpadStyleIndex
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractBooleanSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.BooleanSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.ByteSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.IntSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.LongSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.ShortSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.StringSetting
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
|
||||
/**
|
||||
* ViewModel abstraction for an Item in the RecyclerView powering SettingsFragments.
|
||||
|
@ -37,14 +37,14 @@ abstract class SettingsItem(
|
|||
|
||||
val title: String by lazy {
|
||||
if (titleId != 0) {
|
||||
return@lazy YuzuApplication.appContext.getString(titleId)
|
||||
return@lazy SuyuApplication.appContext.getString(titleId)
|
||||
}
|
||||
return@lazy titleString
|
||||
}
|
||||
|
||||
val description: String by lazy {
|
||||
if (descriptionId != 0) {
|
||||
return@lazy YuzuApplication.appContext.getString(descriptionId)
|
||||
return@lazy SuyuApplication.appContext.getString(descriptionId)
|
||||
}
|
||||
return@lazy descriptionString
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import androidx.annotation.ArrayRes
|
||||
import androidx.annotation.StringRes
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractIntSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractIntSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractSetting
|
||||
|
||||
class SingleChoiceSetting(
|
||||
setting: AbstractSetting,
|
|
@ -1,14 +1,14 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractByteSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractFloatSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractIntSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractShortSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractByteSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractFloatSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractIntSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractShortSetting
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
class SliderSetting(
|
|
@ -1,10 +1,10 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractStringSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractStringSetting
|
||||
|
||||
class StringInputSetting(
|
||||
setting: AbstractStringSetting,
|
|
@ -1,10 +1,10 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractStringSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractStringSetting
|
||||
|
||||
class StringSingleChoiceSetting(
|
||||
private val stringSetting: AbstractStringSetting,
|
|
@ -1,11 +1,11 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.StringRes
|
||||
import org.yuzu.yuzu_emu.features.settings.model.Settings
|
||||
import org.suyu.suyu_emu.features.settings.model.Settings
|
||||
|
||||
class SubmenuSetting(
|
||||
@StringRes titleId: Int = 0,
|
|
@ -1,12 +1,12 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.model.view
|
||||
package org.suyu.suyu_emu.features.settings.model.view
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractBooleanSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractIntSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractBooleanSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractIntSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractSetting
|
||||
|
||||
class SwitchSetting(
|
||||
setting: AbstractSetting,
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui
|
||||
package org.suyu.suyu_emu.features.settings.ui
|
||||
|
||||
import android.app.Dialog
|
||||
import android.graphics.drawable.Animatable2
|
||||
|
@ -17,17 +17,17 @@ import android.view.ViewGroup
|
|||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.databinding.DialogMappingBinding
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.input.model.NativeAnalog
|
||||
import org.yuzu.yuzu_emu.features.input.model.NativeButton
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.AnalogInputSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.ButtonInputSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.InputSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.ModifierInputSetting
|
||||
import org.yuzu.yuzu_emu.utils.InputHandler
|
||||
import org.yuzu.yuzu_emu.utils.ParamPackage
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.databinding.DialogMappingBinding
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.features.input.model.NativeAnalog
|
||||
import org.suyu.suyu_emu.features.input.model.NativeButton
|
||||
import org.suyu.suyu_emu.features.settings.model.view.AnalogInputSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.ButtonInputSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.InputSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.ModifierInputSetting
|
||||
import org.suyu.suyu_emu.utils.InputHandler
|
||||
import org.suyu.suyu_emu.utils.ParamPackage
|
||||
|
||||
class InputDialogFragment : DialogFragment() {
|
||||
private var inputAccepted = false
|
|
@ -1,16 +1,16 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui
|
||||
package org.suyu.suyu_emu.features.settings.ui
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.adapters.AbstractListAdapter
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemInputProfileBinding
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.adapters.AbstractListAdapter
|
||||
import org.suyu.suyu_emu.databinding.ListItemInputProfileBinding
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import org.suyu.suyu_emu.R
|
||||
|
||||
class InputProfileAdapter(options: List<ProfileItem>) :
|
||||
AbstractListAdapter<ProfileItem, AbstractViewHolder<ProfileItem>>(options) {
|
||||
|
@ -57,7 +57,7 @@ sealed interface ProfileItem {
|
|||
data class NewProfileItem(
|
||||
val createNewProfile: () -> Unit
|
||||
) : ProfileItem {
|
||||
override val name: String = YuzuApplication.appContext.getString(R.string.create_new_profile)
|
||||
override val name: String = SuyuApplication.appContext.getString(R.string.create_new_profile)
|
||||
}
|
||||
|
||||
data class ExistingProfileItem(
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui
|
||||
package org.suyu.suyu_emu.features.settings.ui
|
||||
|
||||
import android.app.Dialog
|
||||
import android.os.Bundle
|
||||
|
@ -13,11 +13,11 @@ import androidx.fragment.app.DialogFragment
|
|||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.databinding.DialogInputProfilesBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.InputProfileSetting
|
||||
import org.yuzu.yuzu_emu.fragments.MessageDialogFragment
|
||||
import org.yuzu.yuzu_emu.utils.collect
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.databinding.DialogInputProfilesBinding
|
||||
import org.suyu.suyu_emu.features.settings.model.view.InputProfileSetting
|
||||
import org.suyu.suyu_emu.fragments.MessageDialogFragment
|
||||
import org.suyu.suyu_emu.utils.collect
|
||||
|
||||
class InputProfileDialogFragment : DialogFragment() {
|
||||
private var position = 0
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui
|
||||
package org.suyu.suyu_emu.features.settings.ui
|
||||
|
||||
import android.app.Dialog
|
||||
import android.os.Bundle
|
||||
|
@ -9,9 +9,9 @@ import android.widget.Toast
|
|||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import org.yuzu.yuzu_emu.databinding.DialogEditTextBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.InputProfileSetting
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.suyu.suyu_emu.databinding.DialogEditTextBinding
|
||||
import org.suyu.suyu_emu.features.settings.model.view.InputProfileSetting
|
||||
import org.suyu.suyu_emu.R
|
||||
|
||||
class NewInputProfileDialogFragment : DialogFragment() {
|
||||
private var position = 0
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui
|
||||
package org.suyu.suyu_emu.features.settings.ui
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
|
@ -16,14 +16,14 @@ import androidx.core.view.WindowInsetsCompat
|
|||
import androidx.navigation.fragment.NavHostFragment
|
||||
import androidx.navigation.navArgs
|
||||
import com.google.android.material.color.MaterialColors
|
||||
import org.yuzu.yuzu_emu.NativeLibrary
|
||||
import org.suyu.suyu_emu.NativeLibrary
|
||||
import java.io.IOException
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.databinding.ActivitySettingsBinding
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.settings.utils.SettingsFile
|
||||
import org.yuzu.yuzu_emu.fragments.ResetSettingsDialogFragment
|
||||
import org.yuzu.yuzu_emu.utils.*
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.databinding.ActivitySettingsBinding
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.features.settings.utils.SettingsFile
|
||||
import org.suyu.suyu_emu.fragments.ResetSettingsDialogFragment
|
||||
import org.suyu.suyu_emu.utils.*
|
||||
|
||||
class SettingsActivity : AppCompatActivity() {
|
||||
private lateinit var binding: ActivitySettingsBinding
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui
|
||||
package org.suyu.suyu_emu.features.settings.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.icu.util.Calendar
|
||||
|
@ -20,18 +20,18 @@ import androidx.recyclerview.widget.ListAdapter
|
|||
import com.google.android.material.datepicker.MaterialDatePicker
|
||||
import com.google.android.material.timepicker.MaterialTimePicker
|
||||
import com.google.android.material.timepicker.TimeFormat
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.SettingsNavigationDirections
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingInputBinding
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingSwitchBinding
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingsHeaderBinding
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.input.model.AnalogDirection
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractIntSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.*
|
||||
import org.yuzu.yuzu_emu.features.settings.ui.viewholder.*
|
||||
import org.yuzu.yuzu_emu.utils.ParamPackage
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SettingsNavigationDirections
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingBinding
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingInputBinding
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingSwitchBinding
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingsHeaderBinding
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.features.input.model.AnalogDirection
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractIntSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.*
|
||||
import org.suyu.suyu_emu.features.settings.ui.viewholder.*
|
||||
import org.suyu.suyu_emu.utils.ParamPackage
|
||||
|
||||
class SettingsAdapter(
|
||||
private val fragment: Fragment,
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui
|
||||
package org.suyu.suyu_emu.features.settings.ui
|
||||
|
||||
import android.app.Dialog
|
||||
import android.content.DialogInterface
|
||||
|
@ -13,21 +13,21 @@ import androidx.fragment.app.DialogFragment
|
|||
import androidx.fragment.app.activityViewModels
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.slider.Slider
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.databinding.DialogEditTextBinding
|
||||
import org.yuzu.yuzu_emu.databinding.DialogSliderBinding
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.input.model.AnalogDirection
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.AnalogInputSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.ButtonInputSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.IntSingleChoiceSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SingleChoiceSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SliderSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.StringInputSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.StringSingleChoiceSetting
|
||||
import org.yuzu.yuzu_emu.utils.ParamPackage
|
||||
import org.yuzu.yuzu_emu.utils.collect
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.databinding.DialogEditTextBinding
|
||||
import org.suyu.suyu_emu.databinding.DialogSliderBinding
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.features.input.model.AnalogDirection
|
||||
import org.suyu.suyu_emu.features.settings.model.view.AnalogInputSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.ButtonInputSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.IntSingleChoiceSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SettingsItem
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SingleChoiceSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SliderSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.StringInputSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.StringSingleChoiceSetting
|
||||
import org.suyu.suyu_emu.utils.ParamPackage
|
||||
import org.suyu.suyu_emu.utils.collect
|
||||
|
||||
class SettingsDialogFragment : DialogFragment(), DialogInterface.OnClickListener {
|
||||
private var type = 0
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui
|
||||
package org.suyu.suyu_emu.features.settings.ui
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
|
@ -17,13 +17,13 @@ import androidx.navigation.findNavController
|
|||
import androidx.navigation.fragment.navArgs
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.google.android.material.transition.MaterialSharedAxis
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.databinding.FragmentSettingsBinding
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.settings.model.Settings
|
||||
import org.yuzu.yuzu_emu.fragments.MessageDialogFragment
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins
|
||||
import org.yuzu.yuzu_emu.utils.collect
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.databinding.FragmentSettingsBinding
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.features.settings.model.Settings
|
||||
import org.suyu.suyu_emu.fragments.MessageDialogFragment
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.updateMargins
|
||||
import org.suyu.suyu_emu.utils.collect
|
||||
|
||||
class SettingsFragment : Fragment() {
|
||||
private lateinit var presenter: SettingsFragmentPresenter
|
|
@ -1,32 +1,32 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui
|
||||
package org.suyu.suyu_emu.features.settings.ui
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Build
|
||||
import android.widget.Toast
|
||||
import org.yuzu.yuzu_emu.NativeLibrary
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.input.model.AnalogDirection
|
||||
import org.yuzu.yuzu_emu.features.input.model.NativeAnalog
|
||||
import org.yuzu.yuzu_emu.features.input.model.NativeButton
|
||||
import org.yuzu.yuzu_emu.features.input.model.NpadStyleIndex
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractBooleanSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.AbstractIntSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.ByteSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.IntSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.LongSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.Settings
|
||||
import org.yuzu.yuzu_emu.features.settings.model.Settings.MenuTag
|
||||
import org.yuzu.yuzu_emu.features.settings.model.ShortSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.StringSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.*
|
||||
import org.yuzu.yuzu_emu.utils.InputHandler
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.NativeLibrary
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.features.input.model.AnalogDirection
|
||||
import org.suyu.suyu_emu.features.input.model.NativeAnalog
|
||||
import org.suyu.suyu_emu.features.input.model.NativeButton
|
||||
import org.suyu.suyu_emu.features.input.model.NpadStyleIndex
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractBooleanSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.AbstractIntSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.BooleanSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.ByteSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.IntSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.LongSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.Settings
|
||||
import org.suyu.suyu_emu.features.settings.model.Settings.MenuTag
|
||||
import org.suyu.suyu_emu.features.settings.model.ShortSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.StringSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.*
|
||||
import org.suyu.suyu_emu.utils.InputHandler
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
|
||||
class SettingsFragmentPresenter(
|
||||
private val settingsViewModel: SettingsViewModel,
|
||||
|
@ -35,7 +35,7 @@ class SettingsFragmentPresenter(
|
|||
) {
|
||||
private var settingsList = ArrayList<SettingsItem>()
|
||||
|
||||
private val context get() = YuzuApplication.appContext
|
||||
private val context get() = SuyuApplication.appContext
|
||||
|
||||
// Extension for altering settings list based on each setting's properties
|
||||
fun ArrayList<SettingsItem>.add(key: String) {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui
|
||||
package org.suyu.suyu_emu.features.settings.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
|
@ -19,13 +19,13 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
|||
import com.google.android.material.divider.MaterialDividerItemDecoration
|
||||
import com.google.android.material.transition.MaterialSharedAxis
|
||||
import info.debatty.java.stringsimilarity.Cosine
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.databinding.FragmentSettingsSearchBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins
|
||||
import org.yuzu.yuzu_emu.utils.collect
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.databinding.FragmentSettingsSearchBinding
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SettingsItem
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.updateMargins
|
||||
import org.suyu.suyu_emu.utils.collect
|
||||
|
||||
class SettingsSearchFragment : Fragment() {
|
||||
private var _binding: FragmentSettingsSearchBinding? = null
|
|
@ -1,18 +1,18 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui
|
||||
package org.suyu.suyu_emu.features.settings.ui
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
|
||||
import org.yuzu.yuzu_emu.model.Game
|
||||
import org.yuzu.yuzu_emu.utils.InputHandler
|
||||
import org.yuzu.yuzu_emu.utils.ParamPackage
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SettingsItem
|
||||
import org.suyu.suyu_emu.model.Game
|
||||
import org.suyu.suyu_emu.utils.InputHandler
|
||||
import org.suyu.suyu_emu.utils.ParamPackage
|
||||
|
||||
class SettingsViewModel : ViewModel() {
|
||||
var game: Game? = null
|
||||
|
@ -73,7 +73,7 @@ class SettingsViewModel : ViewModel() {
|
|||
fun setSliderTextValue(value: Float, units: String) {
|
||||
_sliderProgress.value = value.toInt()
|
||||
_sliderTextValue.value = String.format(
|
||||
YuzuApplication.appContext.getString(R.string.value_with_units),
|
||||
SuyuApplication.appContext.getString(R.string.value_with_units),
|
||||
value.toInt().toString(),
|
||||
units
|
||||
)
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui.viewholder
|
||||
package org.suyu.suyu_emu.features.settings.ui.viewholder
|
||||
|
||||
import android.view.View
|
||||
import java.time.Instant
|
||||
|
@ -9,11 +9,11 @@ import java.time.ZoneId
|
|||
import java.time.ZonedDateTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.time.format.FormatStyle
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.DateTimeSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
|
||||
import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingBinding
|
||||
import org.suyu.suyu_emu.features.settings.model.view.DateTimeSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SettingsItem
|
||||
import org.suyu.suyu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
|
||||
class DateTimeViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) :
|
||||
SettingViewHolder(binding.root, adapter) {
|
|
@ -1,12 +1,12 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui.viewholder
|
||||
package org.suyu.suyu_emu.features.settings.ui.viewholder
|
||||
|
||||
import android.view.View
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingsHeaderBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
|
||||
import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingsHeaderBinding
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SettingsItem
|
||||
import org.suyu.suyu_emu.features.settings.ui.SettingsAdapter
|
||||
|
||||
class HeaderViewHolder(val binding: ListItemSettingsHeaderBinding, adapter: SettingsAdapter) :
|
||||
SettingViewHolder(binding.root, adapter) {
|
|
@ -1,15 +1,15 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui.viewholder
|
||||
package org.suyu.suyu_emu.features.settings.ui.viewholder
|
||||
|
||||
import android.view.View
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.InputProfileSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
|
||||
import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingBinding
|
||||
import org.suyu.suyu_emu.features.settings.model.view.InputProfileSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SettingsItem
|
||||
import org.suyu.suyu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
|
||||
class InputProfileViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) :
|
||||
SettingViewHolder(binding.root, adapter) {
|
|
@ -1,18 +1,18 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui.viewholder
|
||||
package org.suyu.suyu_emu.features.settings.ui.viewholder
|
||||
|
||||
import android.view.View
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingInputBinding
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.AnalogInputSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.ButtonInputSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.InputSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.ModifierInputSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
|
||||
import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingInputBinding
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.features.settings.model.view.AnalogInputSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.ButtonInputSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.InputSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.ModifierInputSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SettingsItem
|
||||
import org.suyu.suyu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
|
||||
class InputViewHolder(val binding: ListItemSettingInputBinding, adapter: SettingsAdapter) :
|
||||
SettingViewHolder(binding.root, adapter) {
|
|
@ -1,15 +1,15 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui.viewholder
|
||||
package org.suyu.suyu_emu.features.settings.ui.viewholder
|
||||
|
||||
import android.view.View
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.RunnableSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
|
||||
import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingBinding
|
||||
import org.suyu.suyu_emu.features.settings.model.view.RunnableSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SettingsItem
|
||||
import org.suyu.suyu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
|
||||
class RunnableViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) :
|
||||
SettingViewHolder(binding.root, adapter) {
|
|
@ -1,14 +1,14 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui.viewholder
|
||||
package org.suyu.suyu_emu.features.settings.ui.viewholder
|
||||
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingSwitchBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
|
||||
import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingBinding
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingSwitchBinding
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SettingsItem
|
||||
import org.suyu.suyu_emu.features.settings.ui.SettingsAdapter
|
||||
|
||||
abstract class SettingViewHolder(itemView: View, protected val adapter: SettingsAdapter) :
|
||||
RecyclerView.ViewHolder(itemView), View.OnClickListener, View.OnLongClickListener {
|
|
@ -1,16 +1,16 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui.viewholder
|
||||
package org.suyu.suyu_emu.features.settings.ui.viewholder
|
||||
|
||||
import android.view.View
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.IntSingleChoiceSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SingleChoiceSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.StringSingleChoiceSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingBinding
|
||||
import org.suyu.suyu_emu.features.settings.model.view.IntSingleChoiceSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SettingsItem
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SingleChoiceSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.view.StringSingleChoiceSetting
|
||||
import org.suyu.suyu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
|
||||
class SingleChoiceViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) :
|
||||
SettingViewHolder(binding.root, adapter) {
|
|
@ -1,15 +1,15 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui.viewholder
|
||||
package org.suyu.suyu_emu.features.settings.ui.viewholder
|
||||
|
||||
import android.view.View
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SliderSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingBinding
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SettingsItem
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SliderSetting
|
||||
import org.suyu.suyu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
|
||||
class SliderViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) :
|
||||
SettingViewHolder(binding.root, adapter) {
|
|
@ -1,14 +1,14 @@
|
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui.viewholder
|
||||
package org.suyu.suyu_emu.features.settings.ui.viewholder
|
||||
|
||||
import android.view.View
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.StringInputSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingBinding
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SettingsItem
|
||||
import org.suyu.suyu_emu.features.settings.model.view.StringInputSetting
|
||||
import org.suyu.suyu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
|
||||
class StringInputViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) :
|
||||
SettingViewHolder(binding.root, adapter) {
|
|
@ -1,15 +1,15 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui.viewholder
|
||||
package org.suyu.suyu_emu.features.settings.ui.viewholder
|
||||
|
||||
import android.view.View
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SubmenuSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingBinding
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SettingsItem
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SubmenuSetting
|
||||
import org.suyu.suyu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
|
||||
class SubmenuViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) :
|
||||
SettingViewHolder(binding.root, adapter) {
|
|
@ -1,15 +1,15 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.ui.viewholder
|
||||
package org.suyu.suyu_emu.features.settings.ui.viewholder
|
||||
|
||||
import android.view.View
|
||||
import android.widget.CompoundButton
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingSwitchBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.SwitchSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingSwitchBinding
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SettingsItem
|
||||
import org.suyu.suyu_emu.features.settings.model.view.SwitchSetting
|
||||
import org.suyu.suyu_emu.features.settings.ui.SettingsAdapter
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
|
||||
class SwitchSettingViewHolder(val binding: ListItemSettingSwitchBinding, adapter: SettingsAdapter) :
|
||||
SettingViewHolder(binding.root, adapter) {
|
|
@ -1,14 +1,14 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.features.settings.utils
|
||||
package org.suyu.suyu_emu.features.settings.utils
|
||||
|
||||
import android.net.Uri
|
||||
import org.yuzu.yuzu_emu.model.Game
|
||||
import org.suyu.suyu_emu.model.Game
|
||||
import java.io.*
|
||||
import org.yuzu.yuzu_emu.utils.DirectoryInitialization
|
||||
import org.yuzu.yuzu_emu.utils.FileUtil
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.utils.DirectoryInitialization
|
||||
import org.suyu.suyu_emu.utils.FileUtil
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
|
||||
/**
|
||||
* Contains static methods for interacting with .ini files in which settings are stored.
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.fragments
|
||||
package org.suyu.suyu_emu.fragments
|
||||
|
||||
import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
|
@ -21,11 +21,11 @@ import androidx.fragment.app.Fragment
|
|||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.navigation.findNavController
|
||||
import com.google.android.material.transition.MaterialSharedAxis
|
||||
import org.yuzu.yuzu_emu.BuildConfig
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.databinding.FragmentAboutBinding
|
||||
import org.yuzu.yuzu_emu.model.HomeViewModel
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins
|
||||
import org.suyu.suyu_emu.BuildConfig
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.databinding.FragmentAboutBinding
|
||||
import org.suyu.suyu_emu.model.HomeViewModel
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.updateMargins
|
||||
|
||||
class AboutFragment : Fragment() {
|
||||
private var _binding: FragmentAboutBinding? = null
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.fragments
|
||||
package org.suyu.suyu_emu.fragments
|
||||
|
||||
import android.app.Dialog
|
||||
import android.content.DialogInterface
|
||||
|
@ -10,11 +10,11 @@ import android.os.Bundle
|
|||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.databinding.DialogAddFolderBinding
|
||||
import org.yuzu.yuzu_emu.model.GameDir
|
||||
import org.yuzu.yuzu_emu.model.GamesViewModel
|
||||
import org.yuzu.yuzu_emu.model.HomeViewModel
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.databinding.DialogAddFolderBinding
|
||||
import org.suyu.suyu_emu.model.GameDir
|
||||
import org.suyu.suyu_emu.model.GamesViewModel
|
||||
import org.suyu.suyu_emu.model.HomeViewModel
|
||||
|
||||
class AddGameFolderDialogFragment : DialogFragment() {
|
||||
private val homeViewModel: HomeViewModel by activityViewModels()
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.fragments
|
||||
package org.suyu.suyu_emu.fragments
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
|
@ -20,15 +20,15 @@ import androidx.navigation.fragment.navArgs
|
|||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.google.android.material.transition.MaterialSharedAxis
|
||||
import kotlinx.coroutines.launch
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.adapters.AddonAdapter
|
||||
import org.yuzu.yuzu_emu.databinding.FragmentAddonsBinding
|
||||
import org.yuzu.yuzu_emu.model.AddonViewModel
|
||||
import org.yuzu.yuzu_emu.model.HomeViewModel
|
||||
import org.yuzu.yuzu_emu.utils.AddonUtil
|
||||
import org.yuzu.yuzu_emu.utils.FileUtil.copyFilesTo
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins
|
||||
import org.yuzu.yuzu_emu.utils.collect
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.adapters.AddonAdapter
|
||||
import org.suyu.suyu_emu.databinding.FragmentAddonsBinding
|
||||
import org.suyu.suyu_emu.model.AddonViewModel
|
||||
import org.suyu.suyu_emu.model.HomeViewModel
|
||||
import org.suyu.suyu_emu.utils.AddonUtil
|
||||
import org.suyu.suyu_emu.utils.FileUtil.copyFilesTo
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.updateMargins
|
||||
import org.suyu.suyu_emu.utils.collect
|
||||
import java.io.File
|
||||
|
||||
class AddonsFragment : Fragment() {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.fragments
|
||||
package org.suyu.suyu_emu.fragments
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
|
@ -15,13 +15,13 @@ import androidx.fragment.app.activityViewModels
|
|||
import androidx.navigation.findNavController
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.google.android.material.transition.MaterialSharedAxis
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.adapters.AppletAdapter
|
||||
import org.yuzu.yuzu_emu.databinding.FragmentAppletLauncherBinding
|
||||
import org.yuzu.yuzu_emu.model.Applet
|
||||
import org.yuzu.yuzu_emu.model.AppletInfo
|
||||
import org.yuzu.yuzu_emu.model.HomeViewModel
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.adapters.AppletAdapter
|
||||
import org.suyu.suyu_emu.databinding.FragmentAppletLauncherBinding
|
||||
import org.suyu.suyu_emu.model.Applet
|
||||
import org.suyu.suyu_emu.model.AppletInfo
|
||||
import org.suyu.suyu_emu.model.HomeViewModel
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.updateMargins
|
||||
|
||||
class AppletLauncherFragment : Fragment() {
|
||||
private var _binding: FragmentAppletLauncherBinding? = null
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.fragments
|
||||
package org.suyu.suyu_emu.fragments
|
||||
|
||||
import android.app.Dialog
|
||||
import android.os.Bundle
|
||||
|
@ -11,9 +11,9 @@ import android.view.ViewGroup
|
|||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.adapters.CabinetLauncherDialogAdapter
|
||||
import org.yuzu.yuzu_emu.databinding.DialogListBinding
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.adapters.CabinetLauncherDialogAdapter
|
||||
import org.suyu.suyu_emu.databinding.DialogListBinding
|
||||
|
||||
class CabinetLauncherDialogFragment : DialogFragment() {
|
||||
private lateinit var binding: DialogListBinding
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.yuzu.yuzu_emu.fragments
|
||||
package org.suyu.suyu_emu.fragments
|
||||
|
||||
import android.app.Dialog
|
||||
import android.content.DialogInterface
|
||||
|
@ -10,16 +10,16 @@ import androidx.fragment.app.DialogFragment
|
|||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.preference.PreferenceManager
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.model.AddonViewModel
|
||||
import org.yuzu.yuzu_emu.ui.main.MainActivity
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.model.AddonViewModel
|
||||
import org.suyu.suyu_emu.ui.main.MainActivity
|
||||
|
||||
class ContentTypeSelectionDialogFragment : DialogFragment() {
|
||||
private val addonViewModel: AddonViewModel by activityViewModels()
|
||||
|
||||
private val preferences get() =
|
||||
PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext)
|
||||
PreferenceManager.getDefaultSharedPreferences(SuyuApplication.appContext)
|
||||
|
||||
private var selectedItem = 0
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue