Refactor android to dev.suyu.suyu_emu

This commit is contained in:
Exverge 2024-03-31 20:08:49 -04:00 committed by Crimson Hawk
parent 323ea0cdfd
commit 138d67b307
Signed by: Crimson-Hawk
GPG key ID: 0804DD39BB9BF5AC
214 changed files with 1244 additions and 1250 deletions

View file

@ -37,7 +37,7 @@ fi
# Don't let AppImageLauncher ask to integrate EA
if [ "${RELEASE_NAME}" = "mainline" ] || [ "${RELEASE_NAME}" = "early-access" ]; then
echo "X-AppImage-Integrate=false" >> AppDir/org.suyu_emu.suyu.desktop
echo "X-AppImage-Integrate=false" >> AppDir/dev.suyu_emu.suyu.desktop
fi
if [ "${RELEASE_NAME}" = "mainline" ]; then

View file

@ -732,14 +732,14 @@ endif()
# https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
# https://www.freedesktop.org/software/appstream/docs/
if(ENABLE_QT AND UNIX AND NOT APPLE)
install(FILES "dist/org.suyu_emu.suyu.desktop"
install(FILES "dist/dev.suyu_emu.suyu.desktop"
DESTINATION "share/applications")
install(FILES "dist/suyu.svg"
DESTINATION "share/icons/hicolor/scalable/apps"
RENAME "org.suyu_emu.suyu.svg")
install(FILES "dist/org.suyu_emu.suyu.xml"
RENAME "dev.suyu_emu.suyu.svg")
install(FILES "dist/dev.suyu_emu.suyu.xml"
DESTINATION "share/mime/packages")
install(FILES "dist/org.suyu_emu.suyu.metainfo.xml"
install(FILES "dist/dev.suyu_emu.suyu.metainfo.xml"
DESTINATION "share/metainfo")
endif()

View file

@ -8,7 +8,7 @@ Type=Application
Name=suyu
GenericName=Switch Emulator
Comment=Nintendo Switch video game console emulator
Icon=org.suyu_emu.suyu
Icon=dev.suyu_emu.suyu
TryExec=suyu
Exec=suyu %f
Categories=Game;Emulator;Qt;

View file

@ -7,7 +7,7 @@ SPDX-License-Identifier: CC0-1.0
-->
<component type="desktop-application">
<id>org.suyu_emu.suyu</id>
<id>dev.suyu_emu.suyu</id>
<metadata_license>CC0-1.0</metadata_license>
<name>suyu</name>
<summary>Nintendo Switch emulator</summary>
@ -34,7 +34,7 @@ SPDX-License-Identifier: CC0-1.0
<url type="contact">https://community.citra-emu.org/</url>
<url type="vcs-browser">https://gitlab.com/suyu-emu/suyu</url>
<url type="contribute">https://suyu-emu.org/wiki/contributing/</url>
<launchable type="desktop-id">org.suyu_emu.suyu.desktop</launchable>
<launchable type="desktop-id">dev.suyu_emu.suyu.desktop</launchable>
<provides>
<binary>suyu</binary>
<binary>suyu-cmd</binary>

View file

@ -10,7 +10,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
<mime-type type="application/x-nx-nro">
<comment>Nintendo Switch homebrew executable</comment>
<acronym>NRO</acronym>
<icon name="org.suyu_emu.suyu"/>
<icon name="dev.suyu_emu.suyu"/>
<glob pattern="*.nro"/>
<magic><match value="NRO" type="string" offset="16"/></magic>
</mime-type>
@ -18,7 +18,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
<mime-type type="application/x-nx-nso">
<comment>Nintendo Switch homebrew executable</comment>
<acronym>NSO</acronym>
<icon name="org.suyu_emu.suyu"/>
<icon name="dev.suyu_emu.suyu"/>
<glob pattern="*.nso"/>
<magic><match value="NSO" type="string" offset="0"/></magic>
</mime-type>
@ -26,7 +26,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
<mime-type type="application/x-nx-nsp">
<comment>Nintendo Switch Package</comment>
<acronym>NSP</acronym>
<icon name="org.suyu_emu.suyu"/>
<icon name="dev.suyu_emu.suyu"/>
<glob pattern="*.nsp"/>
<magic><match value="PFS" type="string" offset="0"/></magic>
</mime-type>
@ -34,7 +34,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
<mime-type type="application/x-nx-xci">
<comment>Nintendo Switch Card Image</comment>
<acronym>XCI</acronym>
<icon name="org.suyu_emu.suyu"/>
<icon name="dev.suyu_emu.suyu"/>
<glob pattern="*.xci"/>
</mime-type>
</mime-info>

View file

@ -25,7 +25,7 @@ val autoVersion = (((System.currentTimeMillis() / 1000) - 1451606400) / 10).toIn
@Suppress("UnstableApiUsage")
android {
namespace = "org.suyu.suyu_emu"
namespace = "dev.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.suyu.suyu_emu"
applicationId = "dev.suyu.suyu_emu"
minSdk = 30
targetSdk = 34
versionName = getGitVersion()

View file

@ -17,7 +17,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<uses-permission android:name="android.permission.VIBRATE" />
<application
android:name="org.suyu.suyu_emu.SuyuApplication"
android:name="dev.suyu.suyu_emu.SuyuApplication"
android:label="@string/app_name_suffixed"
android:icon="@drawable/ic_launcher"
android:allowBackup="true"
@ -34,7 +34,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
android:resource="@xml/game_mode_config" />
<activity
android:name="org.suyu.suyu_emu.ui.main.MainActivity"
android:name="dev.suyu.suyu_emu.ui.main.MainActivity"
android:exported="true"
android:theme="@style/Theme.Suyu.Splash.Main">
@ -48,12 +48,12 @@ SPDX-License-Identifier: GPL-3.0-or-later
</activity>
<activity
android:name="org.suyu.suyu_emu.features.settings.ui.SettingsActivity"
android:name="dev.suyu.suyu_emu.features.settings.ui.SettingsActivity"
android:theme="@style/Theme.Suyu.Main"
android:label="@string/preferences_settings"/>
<activity
android:name="org.suyu.suyu_emu.activities.EmulationActivity"
android:name="dev.suyu.suyu_emu.activities.EmulationActivity"
android:theme="@style/Theme.Suyu.Main"
android:launchMode="singleTop"
android:supportsPictureInPicture="true"

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu
package dev.suyu.suyu_emu
import android.content.DialogInterface
import android.net.Uri
@ -13,14 +13,14 @@ import android.widget.TextView
import androidx.annotation.Keep
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import java.lang.ref.WeakReference
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
import dev.suyu.suyu_emu.activities.EmulationActivity
import dev.suyu.suyu_emu.fragments.CoreErrorDialogFragment
import dev.suyu.suyu_emu.utils.DocumentsTree
import dev.suyu.suyu_emu.utils.FileUtil
import dev.suyu.suyu_emu.utils.Log
import dev.suyu.suyu_emu.model.InstallResult
import dev.suyu.suyu_emu.model.Patch
import dev.suyu.suyu_emu.model.GameVerificationResult
/**
* Class which contains methods that interact

View file

@ -1,18 +1,18 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu
package dev.suyu.suyu_emu
import android.app.Application
import android.app.NotificationChannel
import android.app.NotificationManager
import android.content.Context
import org.suyu.suyu_emu.features.input.NativeInput
import dev.suyu.suyu_emu.features.input.NativeInput
import java.io.File
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
import dev.suyu.suyu_emu.utils.DirectoryInitialization
import dev.suyu.suyu_emu.utils.DocumentsTree
import dev.suyu.suyu_emu.utils.GpuDriverHelper
import dev.suyu.suyu_emu.utils.Log
fun Context.getPublicFilesDir(): File = getExternalFilesDir(null) ?: filesDir

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.activities
package dev.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.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 dev.suyu.suyu_emu.NativeLibrary
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.SuyuApplication
import dev.suyu.suyu_emu.databinding.ActivityEmulationBinding
import dev.suyu.suyu_emu.features.input.NativeInput
import dev.suyu.suyu_emu.features.settings.model.BooleanSetting
import dev.suyu.suyu_emu.features.settings.model.IntSetting
import dev.suyu.suyu_emu.features.settings.model.Settings
import dev.suyu.suyu_emu.model.EmulationViewModel
import dev.suyu.suyu_emu.model.Game
import dev.suyu.suyu_emu.utils.InputHandler
import dev.suyu.suyu_emu.utils.Log
import dev.suyu.suyu_emu.utils.MemoryUtil
import dev.suyu.suyu_emu.utils.NativeConfig
import dev.suyu.suyu_emu.utils.NfcReader
import dev.suyu.suyu_emu.utils.ParamPackage
import dev.suyu.suyu_emu.utils.ThemeHelper
import java.text.NumberFormat
import kotlin.math.roundToInt

View file

@ -2,13 +2,13 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.adapters
package dev.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.suyu.suyu_emu.viewholder.AbstractViewHolder
import dev.suyu.suyu_emu.viewholder.AbstractViewHolder
import androidx.recyclerview.widget.RecyclerView
/**

View file

@ -2,11 +2,11 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.adapters
package dev.suyu.suyu_emu.adapters
import android.annotation.SuppressLint
import androidx.recyclerview.widget.RecyclerView
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
import dev.suyu.suyu_emu.viewholder.AbstractViewHolder
/**
* Generic list class meant to take care of basic lists

View file

@ -2,10 +2,10 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.adapters
package dev.suyu.suyu_emu.adapters
import org.suyu.suyu_emu.model.SelectableItem
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
import dev.suyu.suyu_emu.model.SelectableItem
import dev.suyu.suyu_emu.viewholder.AbstractViewHolder
/**
* Generic list class meant to take care of single selection UI updates

View file

@ -1,14 +1,14 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.adapters
package dev.suyu.suyu_emu.adapters
import android.view.LayoutInflater
import android.view.ViewGroup
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
import dev.suyu.suyu_emu.databinding.ListItemAddonBinding
import dev.suyu.suyu_emu.model.Patch
import dev.suyu.suyu_emu.model.AddonViewModel
import dev.suyu.suyu_emu.viewholder.AbstractViewHolder
class AddonAdapter(val addonViewModel: AddonViewModel) :
AbstractDiffAdapter<Patch, AddonAdapter.AddonViewHolder>() {

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.adapters
package dev.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.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
import dev.suyu.suyu_emu.HomeNavigationDirections
import dev.suyu.suyu_emu.NativeLibrary
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.SuyuApplication
import dev.suyu.suyu_emu.databinding.CardSimpleOutlinedBinding
import dev.suyu.suyu_emu.model.Applet
import dev.suyu.suyu_emu.model.AppletInfo
import dev.suyu.suyu_emu.model.Game
import dev.suyu.suyu_emu.viewholder.AbstractViewHolder
class AppletAdapter(val activity: FragmentActivity, applets: List<Applet>) :
AbstractListAdapter<Applet, AppletAdapter.AppletViewHolder>(applets) {

View file

@ -1,23 +1,23 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.adapters
package dev.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.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
import dev.suyu.suyu_emu.HomeNavigationDirections
import dev.suyu.suyu_emu.NativeLibrary
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.SuyuApplication
import dev.suyu.suyu_emu.databinding.DialogListItemBinding
import dev.suyu.suyu_emu.model.CabinetMode
import dev.suyu.suyu_emu.adapters.CabinetLauncherDialogAdapter.CabinetModeViewHolder
import dev.suyu.suyu_emu.model.AppletInfo
import dev.suyu.suyu_emu.model.Game
import dev.suyu.suyu_emu.viewholder.AbstractViewHolder
class CabinetLauncherDialogAdapter(val fragment: Fragment) :
AbstractListAdapter<CabinetMode, CabinetModeViewHolder>(

View file

@ -1,18 +1,18 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.adapters
package dev.suyu.suyu_emu.adapters
import android.view.LayoutInflater
import android.view.ViewGroup
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
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.databinding.CardDriverOptionBinding
import dev.suyu.suyu_emu.features.settings.model.StringSetting
import dev.suyu.suyu_emu.model.Driver
import dev.suyu.suyu_emu.model.DriverViewModel
import dev.suyu.suyu_emu.utils.ViewUtils.marquee
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
import dev.suyu.suyu_emu.viewholder.AbstractViewHolder
class DriverAdapter(private val driverViewModel: DriverViewModel) :
AbstractSingleSelectionList<Driver, DriverAdapter.DriverViewHolder>(

View file

@ -1,18 +1,18 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.adapters
package dev.suyu.suyu_emu.adapters
import android.net.Uri
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.fragment.app.FragmentActivity
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
import dev.suyu.suyu_emu.databinding.CardFolderBinding
import dev.suyu.suyu_emu.fragments.GameFolderPropertiesDialogFragment
import dev.suyu.suyu_emu.model.GameDir
import dev.suyu.suyu_emu.model.GamesViewModel
import dev.suyu.suyu_emu.utils.ViewUtils.marquee
import dev.suyu.suyu_emu.viewholder.AbstractViewHolder
class FolderAdapter(val activity: FragmentActivity, val gamesViewModel: GamesViewModel) :
AbstractDiffAdapter<GameDir, FolderAdapter.FolderViewHolder>() {

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.adapters
package dev.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.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
import dev.suyu.suyu_emu.HomeNavigationDirections
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.SuyuApplication
import dev.suyu.suyu_emu.databinding.CardGameBinding
import dev.suyu.suyu_emu.model.Game
import dev.suyu.suyu_emu.model.GamesViewModel
import dev.suyu.suyu_emu.utils.GameIconUtils
import dev.suyu.suyu_emu.utils.ViewUtils.marquee
import dev.suyu.suyu_emu.viewholder.AbstractViewHolder
class GameAdapter(private val activity: AppCompatActivity) :
AbstractDiffAdapter<Game, GameAdapter.GameViewHolder>(exact = false) {

View file

@ -1,21 +1,21 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.adapters
package dev.suyu.suyu_emu.adapters
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.core.content.res.ResourcesCompat
import androidx.lifecycle.LifecycleOwner
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
import dev.suyu.suyu_emu.databinding.CardInstallableIconBinding
import dev.suyu.suyu_emu.databinding.CardSimpleOutlinedBinding
import dev.suyu.suyu_emu.model.GameProperty
import dev.suyu.suyu_emu.model.InstallableProperty
import dev.suyu.suyu_emu.model.SubmenuProperty
import dev.suyu.suyu_emu.utils.ViewUtils.marquee
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
import dev.suyu.suyu_emu.utils.collect
import dev.suyu.suyu_emu.viewholder.AbstractViewHolder
class GamePropertiesAdapter(
private val viewLifecycle: LifecycleOwner,

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.adapters
package dev.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.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
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.databinding.CardHomeOptionBinding
import dev.suyu.suyu_emu.fragments.MessageDialogFragment
import dev.suyu.suyu_emu.model.HomeSetting
import dev.suyu.suyu_emu.utils.ViewUtils.marquee
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
import dev.suyu.suyu_emu.utils.collect
import dev.suyu.suyu_emu.viewholder.AbstractViewHolder
class HomeSettingAdapter(
private val activity: AppCompatActivity,

View file

@ -1,14 +1,14 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.adapters
package dev.suyu.suyu_emu.adapters
import android.view.LayoutInflater
import android.view.ViewGroup
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
import dev.suyu.suyu_emu.databinding.CardInstallableBinding
import dev.suyu.suyu_emu.model.Installable
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
import dev.suyu.suyu_emu.viewholder.AbstractViewHolder
class InstallableAdapter(installables: List<Installable>) :
AbstractListAdapter<Installable, InstallableAdapter.InstallableViewHolder>(installables) {

View file

@ -1,16 +1,16 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.adapters
package dev.suyu.suyu_emu.adapters
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
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
import dev.suyu.suyu_emu.databinding.ListItemSettingBinding
import dev.suyu.suyu_emu.fragments.LicenseBottomSheetDialogFragment
import dev.suyu.suyu_emu.model.License
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
import dev.suyu.suyu_emu.viewholder.AbstractViewHolder
class LicenseAdapter(private val activity: AppCompatActivity, licenses: List<License>) :
AbstractListAdapter<License, LicenseAdapter.LicenseViewHolder>(licenses) {

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.adapters
package dev.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.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
import dev.suyu.suyu_emu.databinding.PageSetupBinding
import dev.suyu.suyu_emu.model.HomeViewModel
import dev.suyu.suyu_emu.model.SetupCallback
import dev.suyu.suyu_emu.model.SetupPage
import dev.suyu.suyu_emu.model.StepState
import dev.suyu.suyu_emu.utils.ViewUtils
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
import dev.suyu.suyu_emu.viewholder.AbstractViewHolder
class SetupAdapter(val activity: AppCompatActivity, pages: List<SetupPage>) :
AbstractListAdapter<SetupPage, SetupAdapter.SetupPageViewHolder>(pages) {

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.applets.keyboard
package dev.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.suyu.suyu_emu.NativeLibrary
import org.suyu.suyu_emu.R
import org.suyu.suyu_emu.applets.keyboard.ui.KeyboardDialogFragment
import dev.suyu.suyu_emu.NativeLibrary
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.applets.keyboard.ui.KeyboardDialogFragment
@Keep
object SoftwareKeyboard {

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.applets.keyboard.ui
package dev.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.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
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.applets.keyboard.SoftwareKeyboard
import dev.suyu.suyu_emu.applets.keyboard.SoftwareKeyboard.KeyboardConfig
import dev.suyu.suyu_emu.databinding.DialogEditTextBinding
import dev.suyu.suyu_emu.utils.SerializableHelper.serializable
class KeyboardDialogFragment : DialogFragment() {
private lateinit var binding: DialogEditTextBinding

View file

@ -1,15 +1,15 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.disk_shader_cache
package dev.suyu.suyu_emu.disk_shader_cache
import androidx.annotation.Keep
import androidx.lifecycle.ViewModelProvider
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
import dev.suyu.suyu_emu.NativeLibrary
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.activities.EmulationActivity
import dev.suyu.suyu_emu.model.EmulationViewModel
import dev.suyu.suyu_emu.utils.Log
@Keep
object DiskShaderCacheProgress {

View file

@ -4,7 +4,7 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright © 2023 Skyline Team and Contributors (https://github.com/skyline-emu/)
package org.suyu.suyu_emu.features
package dev.suyu.suyu_emu.features
import android.database.Cursor
import android.database.MatrixCursor
@ -14,10 +14,10 @@ import android.provider.DocumentsContract
import android.provider.DocumentsProvider
import android.webkit.MimeTypeMap
import java.io.*
import org.suyu.suyu_emu.BuildConfig
import org.suyu.suyu_emu.R
import org.suyu.suyu_emu.SuyuApplication
import org.suyu.suyu_emu.getPublicFilesDir
import dev.suyu.suyu_emu.BuildConfig
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.SuyuApplication
import dev.suyu.suyu_emu.getPublicFilesDir
class DocumentProvider : DocumentsProvider() {
private val baseDirectory: File

View file

@ -2,15 +2,15 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.input
package dev.suyu.suyu_emu.features.input
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 dev.suyu.suyu_emu.features.input.model.NativeButton
import dev.suyu.suyu_emu.features.input.model.NativeAnalog
import dev.suyu.suyu_emu.features.input.model.InputType
import dev.suyu.suyu_emu.features.input.model.ButtonName
import dev.suyu.suyu_emu.features.input.model.NpadStyleIndex
import dev.suyu.suyu_emu.utils.NativeConfig
import dev.suyu.suyu_emu.utils.ParamPackage
import android.view.InputDevice
object NativeInput {

View file

@ -2,13 +2,13 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.input
package dev.suyu.suyu_emu.features.input
import android.view.InputDevice
import androidx.annotation.Keep
import org.suyu.suyu_emu.SuyuApplication
import org.suyu.suyu_emu.R
import org.suyu.suyu_emu.utils.InputHandler.getGUID
import dev.suyu.suyu_emu.SuyuApplication
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.utils.InputHandler.getGUID
@Keep
interface SuyuInputDevice {

View file

@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.input
package dev.suyu.suyu_emu.features.input
import android.content.Context
import android.os.Build
@ -13,7 +13,7 @@ import android.os.VibratorManager
import android.view.InputDevice
import androidx.annotation.Keep
import androidx.annotation.RequiresApi
import org.suyu.suyu_emu.SuyuApplication
import dev.suyu.suyu_emu.SuyuApplication
@Keep
@Suppress("DEPRECATION")

View file

@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.input.model
package dev.suyu.suyu_emu.features.input.model
enum class AnalogDirection(val int: Int, val param: String) {
Up(0, "up"),

View file

@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.input.model
package dev.suyu.suyu_emu.features.input.model
// Loosely matches the enum in common/input.h
enum class ButtonName(val int: Int) {

View file

@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.input.model
package dev.suyu.suyu_emu.features.input.model
// Must match the corresponding enum in input_common/main.h
enum class InputType(val int: Int) {

View file

@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.input.model
package dev.suyu.suyu_emu.features.input.model
// Must match enum in src/common/settings_input.h
enum class NativeAnalog(val int: Int) {

View file

@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.input.model
package dev.suyu.suyu_emu.features.input.model
// Must match enum in src/common/settings_input.h
enum class NativeButton(val int: Int) {

View file

@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.input.model
package dev.suyu.suyu_emu.features.input.model
// Must match enum in src/common/settings_input.h
enum class NativeTrigger(val int: Int) {

View file

@ -2,10 +2,10 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.input.model
package dev.suyu.suyu_emu.features.input.model
import androidx.annotation.StringRes
import org.suyu.suyu_emu.R
import dev.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) {

View file

@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.input.model
package dev.suyu.suyu_emu.features.input.model
import androidx.annotation.Keep

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
interface AbstractBooleanSetting : AbstractSetting {
fun getBoolean(needsGlobal: Boolean = false): Boolean

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
interface AbstractByteSetting : AbstractSetting {
fun getByte(needsGlobal: Boolean = false): Byte

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
interface AbstractFloatSetting : AbstractSetting {
fun getFloat(needsGlobal: Boolean = false): Float

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
interface AbstractIntSetting : AbstractSetting {
fun getInt(needsGlobal: Boolean = false): Int

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
interface AbstractLongSetting : AbstractSetting {
fun getLong(needsGlobal: Boolean = false): Long

View file

@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
import org.suyu.suyu_emu.utils.NativeConfig
import dev.suyu.suyu_emu.utils.NativeConfig
interface AbstractSetting {
val key: String

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
interface AbstractShortSetting : AbstractSetting {
fun getShort(needsGlobal: Boolean = false): Short

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
interface AbstractStringSetting : AbstractSetting {
fun getString(needsGlobal: Boolean = false): String

View file

@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
import org.suyu.suyu_emu.utils.NativeConfig
import dev.suyu.suyu_emu.utils.NativeConfig
enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
AUDIO_MUTED("audio_muted"),

View file

@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
import org.suyu.suyu_emu.utils.NativeConfig
import dev.suyu.suyu_emu.utils.NativeConfig
enum class ByteSetting(override val key: String) : AbstractByteSetting {
AUDIO_VOLUME("volume");

View file

@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
import org.suyu.suyu_emu.utils.NativeConfig
import dev.suyu.suyu_emu.utils.NativeConfig
enum class FloatSetting(override val key: String) : AbstractFloatSetting {
// No float settings currently exist

View file

@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
import org.suyu.suyu_emu.utils.NativeConfig
import dev.suyu.suyu_emu.utils.NativeConfig
enum class IntSetting(override val key: String) : AbstractIntSetting {
CPU_BACKEND("cpu_backend"),

View file

@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
import org.suyu.suyu_emu.utils.NativeConfig
import dev.suyu.suyu_emu.utils.NativeConfig
enum class LongSetting(override val key: String) : AbstractLongSetting {
CUSTOM_RTC("custom_rtc");

View file

@ -1,10 +1,10 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
import org.suyu.suyu_emu.R
import org.suyu.suyu_emu.SuyuApplication
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.SuyuApplication
object Settings {
enum class MenuTag(val titleId: Int = 0) {

View file

@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
import org.suyu.suyu_emu.utils.NativeConfig
import dev.suyu.suyu_emu.utils.NativeConfig
enum class ShortSetting(override val key: String) : AbstractShortSetting {
RENDERER_SPEED_LIMIT("speed_limit");

View file

@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model
package dev.suyu.suyu_emu.features.settings.model
import org.suyu.suyu_emu.utils.NativeConfig
import dev.suyu.suyu_emu.utils.NativeConfig
enum class StringSetting(override val key: String) : AbstractStringSetting {
DRIVER_PATH("driver_path"),

View file

@ -2,14 +2,14 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import androidx.annotation.StringRes
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
import dev.suyu.suyu_emu.features.input.NativeInput
import dev.suyu.suyu_emu.features.input.model.AnalogDirection
import dev.suyu.suyu_emu.features.input.model.InputType
import dev.suyu.suyu_emu.features.input.model.NativeAnalog
import dev.suyu.suyu_emu.utils.ParamPackage
class AnalogInputSetting(
override val playerIndex: Int,

View file

@ -2,13 +2,13 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import androidx.annotation.StringRes
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
import dev.suyu.suyu_emu.utils.ParamPackage
import dev.suyu.suyu_emu.features.input.NativeInput
import dev.suyu.suyu_emu.features.input.model.InputType
import dev.suyu.suyu_emu.features.input.model.NativeButton
class ButtonInputSetting(
override val playerIndex: Int,

View file

@ -1,10 +1,10 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import androidx.annotation.StringRes
import org.suyu.suyu_emu.features.settings.model.AbstractLongSetting
import dev.suyu.suyu_emu.features.settings.model.AbstractLongSetting
class DateTimeSetting(
private val longSetting: AbstractLongSetting,

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import androidx.annotation.StringRes

View file

@ -2,11 +2,11 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import org.suyu.suyu_emu.R
import org.suyu.suyu_emu.features.input.NativeInput
import org.suyu.suyu_emu.utils.NativeConfig
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.features.input.NativeInput
import dev.suyu.suyu_emu.utils.NativeConfig
class InputProfileSetting(private val playerIndex: Int) :
SettingsItem(emptySetting, R.string.profile, "", 0, "") {

View file

@ -2,15 +2,15 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import androidx.annotation.StringRes
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
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.SuyuApplication
import dev.suyu.suyu_emu.features.input.NativeInput
import dev.suyu.suyu_emu.features.input.model.ButtonName
import dev.suyu.suyu_emu.features.input.model.InputType
import dev.suyu.suyu_emu.utils.ParamPackage
sealed class InputSetting(
@StringRes titleId: Int,

View file

@ -1,10 +1,10 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import androidx.annotation.StringRes
import org.suyu.suyu_emu.features.settings.model.AbstractIntSetting
import dev.suyu.suyu_emu.features.settings.model.AbstractIntSetting
class IntSingleChoiceSetting(
private val intSetting: AbstractIntSetting,

View file

@ -2,13 +2,13 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import androidx.annotation.StringRes
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
import dev.suyu.suyu_emu.features.input.NativeInput
import dev.suyu.suyu_emu.features.input.model.InputType
import dev.suyu.suyu_emu.features.input.model.NativeAnalog
import dev.suyu.suyu_emu.utils.ParamPackage
class ModifierInputSetting(
override val playerIndex: Int,

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import androidx.annotation.DrawableRes
import androidx.annotation.StringRes

View file

@ -1,23 +1,23 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import androidx.annotation.StringRes
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
import dev.suyu.suyu_emu.NativeLibrary
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.SuyuApplication
import dev.suyu.suyu_emu.features.input.NativeInput
import dev.suyu.suyu_emu.features.input.model.NpadStyleIndex
import dev.suyu.suyu_emu.features.settings.model.AbstractBooleanSetting
import dev.suyu.suyu_emu.features.settings.model.AbstractSetting
import dev.suyu.suyu_emu.features.settings.model.BooleanSetting
import dev.suyu.suyu_emu.features.settings.model.ByteSetting
import dev.suyu.suyu_emu.features.settings.model.IntSetting
import dev.suyu.suyu_emu.features.settings.model.LongSetting
import dev.suyu.suyu_emu.features.settings.model.ShortSetting
import dev.suyu.suyu_emu.features.settings.model.StringSetting
import dev.suyu.suyu_emu.utils.NativeConfig
/**
* ViewModel abstraction for an Item in the RecyclerView powering SettingsFragments.

View file

@ -1,12 +1,12 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import androidx.annotation.ArrayRes
import androidx.annotation.StringRes
import org.suyu.suyu_emu.features.settings.model.AbstractIntSetting
import org.suyu.suyu_emu.features.settings.model.AbstractSetting
import dev.suyu.suyu_emu.features.settings.model.AbstractIntSetting
import dev.suyu.suyu_emu.features.settings.model.AbstractSetting
class SingleChoiceSetting(
setting: AbstractSetting,

View file

@ -1,14 +1,14 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import androidx.annotation.StringRes
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 dev.suyu.suyu_emu.features.settings.model.AbstractByteSetting
import dev.suyu.suyu_emu.features.settings.model.AbstractFloatSetting
import dev.suyu.suyu_emu.features.settings.model.AbstractIntSetting
import dev.suyu.suyu_emu.features.settings.model.AbstractSetting
import dev.suyu.suyu_emu.features.settings.model.AbstractShortSetting
import kotlin.math.roundToInt
class SliderSetting(

View file

@ -2,10 +2,10 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import androidx.annotation.StringRes
import org.suyu.suyu_emu.features.settings.model.AbstractStringSetting
import dev.suyu.suyu_emu.features.settings.model.AbstractStringSetting
class StringInputSetting(
setting: AbstractStringSetting,

View file

@ -1,10 +1,10 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import androidx.annotation.StringRes
import org.suyu.suyu_emu.features.settings.model.AbstractStringSetting
import dev.suyu.suyu_emu.features.settings.model.AbstractStringSetting
class StringSingleChoiceSetting(
private val stringSetting: AbstractStringSetting,

View file

@ -1,11 +1,11 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import org.suyu.suyu_emu.features.settings.model.Settings
import dev.suyu.suyu_emu.features.settings.model.Settings
class SubmenuSetting(
@StringRes titleId: Int = 0,

View file

@ -1,12 +1,12 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.model.view
package dev.suyu.suyu_emu.features.settings.model.view
import androidx.annotation.StringRes
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
import dev.suyu.suyu_emu.features.settings.model.AbstractBooleanSetting
import dev.suyu.suyu_emu.features.settings.model.AbstractIntSetting
import dev.suyu.suyu_emu.features.settings.model.AbstractSetting
class SwitchSetting(
setting: AbstractSetting,

View file

@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui
package dev.suyu.suyu_emu.features.settings.ui
import android.app.Dialog
import android.graphics.drawable.Animatable2
@ -18,17 +18,17 @@ import android.view.ViewGroup
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.activityViewModels
import com.google.android.material.dialog.MaterialAlertDialogBuilder
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
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.databinding.DialogMappingBinding
import dev.suyu.suyu_emu.features.input.NativeInput
import dev.suyu.suyu_emu.features.input.model.NativeAnalog
import dev.suyu.suyu_emu.features.input.model.NativeButton
import dev.suyu.suyu_emu.features.settings.model.view.AnalogInputSetting
import dev.suyu.suyu_emu.features.settings.model.view.ButtonInputSetting
import dev.suyu.suyu_emu.features.settings.model.view.InputSetting
import dev.suyu.suyu_emu.features.settings.model.view.ModifierInputSetting
import dev.suyu.suyu_emu.utils.InputHandler
import dev.suyu.suyu_emu.utils.ParamPackage
class InputDialogFragment : DialogFragment() {
private var inputAccepted = false

View file

@ -2,16 +2,16 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui
package dev.suyu.suyu_emu.features.settings.ui
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
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
import dev.suyu.suyu_emu.SuyuApplication
import dev.suyu.suyu_emu.adapters.AbstractListAdapter
import dev.suyu.suyu_emu.databinding.ListItemInputProfileBinding
import dev.suyu.suyu_emu.viewholder.AbstractViewHolder
import dev.suyu.suyu_emu.R
class InputProfileAdapter(options: List<ProfileItem>) :
AbstractListAdapter<ProfileItem, AbstractViewHolder<ProfileItem>>(options) {

View file

@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui
package dev.suyu.suyu_emu.features.settings.ui
import android.app.Dialog
import android.os.Bundle
@ -14,11 +14,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.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
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.databinding.DialogInputProfilesBinding
import dev.suyu.suyu_emu.features.settings.model.view.InputProfileSetting
import dev.suyu.suyu_emu.fragments.MessageDialogFragment
import dev.suyu.suyu_emu.utils.collect
class InputProfileDialogFragment : DialogFragment() {
private var position = 0

View file

@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui
package dev.suyu.suyu_emu.features.settings.ui
import android.app.Dialog
import android.os.Bundle
@ -10,9 +10,9 @@ import android.widget.Toast
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.activityViewModels
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import org.suyu.suyu_emu.databinding.DialogEditTextBinding
import org.suyu.suyu_emu.features.settings.model.view.InputProfileSetting
import org.suyu.suyu_emu.R
import dev.suyu.suyu_emu.databinding.DialogEditTextBinding
import dev.suyu.suyu_emu.features.settings.model.view.InputProfileSetting
import dev.suyu.suyu_emu.R
class NewInputProfileDialogFragment : DialogFragment() {
private var position = 0

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui
package dev.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.suyu.suyu_emu.NativeLibrary
import dev.suyu.suyu_emu.NativeLibrary
import java.io.IOException
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.*
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.databinding.ActivitySettingsBinding
import dev.suyu.suyu_emu.features.input.NativeInput
import dev.suyu.suyu_emu.features.settings.utils.SettingsFile
import dev.suyu.suyu_emu.fragments.ResetSettingsDialogFragment
import dev.suyu.suyu_emu.utils.*
class SettingsActivity : AppCompatActivity() {
private lateinit var binding: ActivitySettingsBinding

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui
package dev.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.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
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.SettingsNavigationDirections
import dev.suyu.suyu_emu.databinding.ListItemSettingBinding
import dev.suyu.suyu_emu.databinding.ListItemSettingInputBinding
import dev.suyu.suyu_emu.databinding.ListItemSettingSwitchBinding
import dev.suyu.suyu_emu.databinding.ListItemSettingsHeaderBinding
import dev.suyu.suyu_emu.features.input.NativeInput
import dev.suyu.suyu_emu.features.input.model.AnalogDirection
import dev.suyu.suyu_emu.features.settings.model.AbstractIntSetting
import dev.suyu.suyu_emu.features.settings.model.view.*
import dev.suyu.suyu_emu.features.settings.ui.viewholder.*
import dev.suyu.suyu_emu.utils.ParamPackage
class SettingsAdapter(
private val fragment: Fragment,

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui
package dev.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.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
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.databinding.DialogEditTextBinding
import dev.suyu.suyu_emu.databinding.DialogSliderBinding
import dev.suyu.suyu_emu.features.input.NativeInput
import dev.suyu.suyu_emu.features.input.model.AnalogDirection
import dev.suyu.suyu_emu.features.settings.model.view.AnalogInputSetting
import dev.suyu.suyu_emu.features.settings.model.view.ButtonInputSetting
import dev.suyu.suyu_emu.features.settings.model.view.IntSingleChoiceSetting
import dev.suyu.suyu_emu.features.settings.model.view.SettingsItem
import dev.suyu.suyu_emu.features.settings.model.view.SingleChoiceSetting
import dev.suyu.suyu_emu.features.settings.model.view.SliderSetting
import dev.suyu.suyu_emu.features.settings.model.view.StringInputSetting
import dev.suyu.suyu_emu.features.settings.model.view.StringSingleChoiceSetting
import dev.suyu.suyu_emu.utils.ParamPackage
import dev.suyu.suyu_emu.utils.collect
class SettingsDialogFragment : DialogFragment(), DialogInterface.OnClickListener {
private var type = 0

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui
package dev.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.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
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.databinding.FragmentSettingsBinding
import dev.suyu.suyu_emu.features.input.NativeInput
import dev.suyu.suyu_emu.features.settings.model.Settings
import dev.suyu.suyu_emu.fragments.MessageDialogFragment
import dev.suyu.suyu_emu.utils.ViewUtils.updateMargins
import dev.suyu.suyu_emu.utils.collect
class SettingsFragment : Fragment() {
private lateinit var presenter: SettingsFragmentPresenter

View file

@ -1,32 +1,32 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui
package dev.suyu.suyu_emu.features.settings.ui
import android.annotation.SuppressLint
import android.os.Build
import android.widget.Toast
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
import dev.suyu.suyu_emu.NativeLibrary
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.SuyuApplication
import dev.suyu.suyu_emu.features.input.NativeInput
import dev.suyu.suyu_emu.features.input.model.AnalogDirection
import dev.suyu.suyu_emu.features.input.model.NativeAnalog
import dev.suyu.suyu_emu.features.input.model.NativeButton
import dev.suyu.suyu_emu.features.input.model.NpadStyleIndex
import dev.suyu.suyu_emu.features.settings.model.AbstractBooleanSetting
import dev.suyu.suyu_emu.features.settings.model.AbstractIntSetting
import dev.suyu.suyu_emu.features.settings.model.BooleanSetting
import dev.suyu.suyu_emu.features.settings.model.ByteSetting
import dev.suyu.suyu_emu.features.settings.model.IntSetting
import dev.suyu.suyu_emu.features.settings.model.LongSetting
import dev.suyu.suyu_emu.features.settings.model.Settings
import dev.suyu.suyu_emu.features.settings.model.Settings.MenuTag
import dev.suyu.suyu_emu.features.settings.model.ShortSetting
import dev.suyu.suyu_emu.features.settings.model.StringSetting
import dev.suyu.suyu_emu.features.settings.model.view.*
import dev.suyu.suyu_emu.utils.InputHandler
import dev.suyu.suyu_emu.utils.NativeConfig
class SettingsFragmentPresenter(
private val settingsViewModel: SettingsViewModel,

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui
package dev.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.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
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.databinding.FragmentSettingsSearchBinding
import dev.suyu.suyu_emu.features.settings.model.view.SettingsItem
import dev.suyu.suyu_emu.utils.NativeConfig
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
import dev.suyu.suyu_emu.utils.ViewUtils.updateMargins
import dev.suyu.suyu_emu.utils.collect
class SettingsSearchFragment : Fragment() {
private var _binding: FragmentSettingsSearchBinding? = null

View file

@ -1,18 +1,18 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui
package dev.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.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
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.SuyuApplication
import dev.suyu.suyu_emu.features.settings.model.view.SettingsItem
import dev.suyu.suyu_emu.model.Game
import dev.suyu.suyu_emu.utils.InputHandler
import dev.suyu.suyu_emu.utils.ParamPackage
class SettingsViewModel : ViewModel() {
var game: Game? = null

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui.viewholder
package dev.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.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
import dev.suyu.suyu_emu.databinding.ListItemSettingBinding
import dev.suyu.suyu_emu.features.settings.model.view.DateTimeSetting
import dev.suyu.suyu_emu.features.settings.model.view.SettingsItem
import dev.suyu.suyu_emu.features.settings.ui.SettingsAdapter
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
class DateTimeViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) :
SettingViewHolder(binding.root, adapter) {

View file

@ -1,12 +1,12 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui.viewholder
package dev.suyu.suyu_emu.features.settings.ui.viewholder
import android.view.View
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
import dev.suyu.suyu_emu.databinding.ListItemSettingsHeaderBinding
import dev.suyu.suyu_emu.features.settings.model.view.SettingsItem
import dev.suyu.suyu_emu.features.settings.ui.SettingsAdapter
class HeaderViewHolder(val binding: ListItemSettingsHeaderBinding, adapter: SettingsAdapter) :
SettingViewHolder(binding.root, adapter) {

View file

@ -2,15 +2,15 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui.viewholder
package dev.suyu.suyu_emu.features.settings.ui.viewholder
import android.view.View
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
import dev.suyu.suyu_emu.databinding.ListItemSettingBinding
import dev.suyu.suyu_emu.features.settings.model.view.InputProfileSetting
import dev.suyu.suyu_emu.features.settings.model.view.SettingsItem
import dev.suyu.suyu_emu.features.settings.ui.SettingsAdapter
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
class InputProfileViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) :
SettingViewHolder(binding.root, adapter) {

View file

@ -2,18 +2,18 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui.viewholder
package dev.suyu.suyu_emu.features.settings.ui.viewholder
import android.view.View
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
import dev.suyu.suyu_emu.databinding.ListItemSettingInputBinding
import dev.suyu.suyu_emu.features.input.NativeInput
import dev.suyu.suyu_emu.features.settings.model.view.AnalogInputSetting
import dev.suyu.suyu_emu.features.settings.model.view.ButtonInputSetting
import dev.suyu.suyu_emu.features.settings.model.view.InputSetting
import dev.suyu.suyu_emu.features.settings.model.view.ModifierInputSetting
import dev.suyu.suyu_emu.features.settings.model.view.SettingsItem
import dev.suyu.suyu_emu.features.settings.ui.SettingsAdapter
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
class InputViewHolder(val binding: ListItemSettingInputBinding, adapter: SettingsAdapter) :
SettingViewHolder(binding.root, adapter) {

View file

@ -1,15 +1,15 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui.viewholder
package dev.suyu.suyu_emu.features.settings.ui.viewholder
import android.view.View
import androidx.core.content.res.ResourcesCompat
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
import dev.suyu.suyu_emu.databinding.ListItemSettingBinding
import dev.suyu.suyu_emu.features.settings.model.view.RunnableSetting
import dev.suyu.suyu_emu.features.settings.model.view.SettingsItem
import dev.suyu.suyu_emu.features.settings.ui.SettingsAdapter
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
class RunnableViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) :
SettingViewHolder(binding.root, adapter) {

View file

@ -1,14 +1,14 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui.viewholder
package dev.suyu.suyu_emu.features.settings.ui.viewholder
import android.view.View
import androidx.recyclerview.widget.RecyclerView
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
import dev.suyu.suyu_emu.databinding.ListItemSettingBinding
import dev.suyu.suyu_emu.databinding.ListItemSettingSwitchBinding
import dev.suyu.suyu_emu.features.settings.model.view.SettingsItem
import dev.suyu.suyu_emu.features.settings.ui.SettingsAdapter
abstract class SettingViewHolder(itemView: View, protected val adapter: SettingsAdapter) :
RecyclerView.ViewHolder(itemView), View.OnClickListener, View.OnLongClickListener {

View file

@ -1,16 +1,16 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui.viewholder
package dev.suyu.suyu_emu.features.settings.ui.viewholder
import android.view.View
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
import dev.suyu.suyu_emu.databinding.ListItemSettingBinding
import dev.suyu.suyu_emu.features.settings.model.view.IntSingleChoiceSetting
import dev.suyu.suyu_emu.features.settings.model.view.SettingsItem
import dev.suyu.suyu_emu.features.settings.model.view.SingleChoiceSetting
import dev.suyu.suyu_emu.features.settings.model.view.StringSingleChoiceSetting
import dev.suyu.suyu_emu.features.settings.ui.SettingsAdapter
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
class SingleChoiceViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) :
SettingViewHolder(binding.root, adapter) {

View file

@ -1,15 +1,15 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui.viewholder
package dev.suyu.suyu_emu.features.settings.ui.viewholder
import android.view.View
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
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.databinding.ListItemSettingBinding
import dev.suyu.suyu_emu.features.settings.model.view.SettingsItem
import dev.suyu.suyu_emu.features.settings.model.view.SliderSetting
import dev.suyu.suyu_emu.features.settings.ui.SettingsAdapter
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
class SliderViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) :
SettingViewHolder(binding.root, adapter) {

View file

@ -2,14 +2,14 @@
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui.viewholder
package dev.suyu.suyu_emu.features.settings.ui.viewholder
import android.view.View
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
import dev.suyu.suyu_emu.databinding.ListItemSettingBinding
import dev.suyu.suyu_emu.features.settings.model.view.SettingsItem
import dev.suyu.suyu_emu.features.settings.model.view.StringInputSetting
import dev.suyu.suyu_emu.features.settings.ui.SettingsAdapter
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
class StringInputViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) :
SettingViewHolder(binding.root, adapter) {

View file

@ -1,15 +1,15 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui.viewholder
package dev.suyu.suyu_emu.features.settings.ui.viewholder
import android.view.View
import androidx.core.content.res.ResourcesCompat
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
import dev.suyu.suyu_emu.databinding.ListItemSettingBinding
import dev.suyu.suyu_emu.features.settings.model.view.SettingsItem
import dev.suyu.suyu_emu.features.settings.model.view.SubmenuSetting
import dev.suyu.suyu_emu.features.settings.ui.SettingsAdapter
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
class SubmenuViewHolder(val binding: ListItemSettingBinding, adapter: SettingsAdapter) :
SettingViewHolder(binding.root, adapter) {

View file

@ -1,15 +1,15 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.ui.viewholder
package dev.suyu.suyu_emu.features.settings.ui.viewholder
import android.view.View
import android.widget.CompoundButton
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
import dev.suyu.suyu_emu.databinding.ListItemSettingSwitchBinding
import dev.suyu.suyu_emu.features.settings.model.view.SettingsItem
import dev.suyu.suyu_emu.features.settings.model.view.SwitchSetting
import dev.suyu.suyu_emu.features.settings.ui.SettingsAdapter
import dev.suyu.suyu_emu.utils.ViewUtils.setVisible
class SwitchSettingViewHolder(val binding: ListItemSettingSwitchBinding, adapter: SettingsAdapter) :
SettingViewHolder(binding.root, adapter) {

View file

@ -1,14 +1,14 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.features.settings.utils
package dev.suyu.suyu_emu.features.settings.utils
import android.net.Uri
import org.suyu.suyu_emu.model.Game
import dev.suyu.suyu_emu.model.Game
import java.io.*
import org.suyu.suyu_emu.utils.DirectoryInitialization
import org.suyu.suyu_emu.utils.FileUtil
import org.suyu.suyu_emu.utils.NativeConfig
import dev.suyu.suyu_emu.utils.DirectoryInitialization
import dev.suyu.suyu_emu.utils.FileUtil
import dev.suyu.suyu_emu.utils.NativeConfig
/**
* Contains static methods for interacting with .ini files in which settings are stored.

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.fragments
package dev.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.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
import dev.suyu.suyu_emu.BuildConfig
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.databinding.FragmentAboutBinding
import dev.suyu.suyu_emu.model.HomeViewModel
import dev.suyu.suyu_emu.utils.ViewUtils.updateMargins
class AboutFragment : Fragment() {
private var _binding: FragmentAboutBinding? = null

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.fragments
package dev.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.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
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.databinding.DialogAddFolderBinding
import dev.suyu.suyu_emu.model.GameDir
import dev.suyu.suyu_emu.model.GamesViewModel
import dev.suyu.suyu_emu.model.HomeViewModel
class AddGameFolderDialogFragment : DialogFragment() {
private val homeViewModel: HomeViewModel by activityViewModels()

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.fragments
package dev.suyu.suyu_emu.fragments
import android.content.Intent
import android.os.Bundle
@ -19,16 +19,15 @@ import androidx.navigation.findNavController
import androidx.navigation.fragment.navArgs
import androidx.recyclerview.widget.LinearLayoutManager
import com.google.android.material.transition.MaterialSharedAxis
import kotlinx.coroutines.launch
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 dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.adapters.AddonAdapter
import dev.suyu.suyu_emu.databinding.FragmentAddonsBinding
import dev.suyu.suyu_emu.model.AddonViewModel
import dev.suyu.suyu_emu.model.HomeViewModel
import dev.suyu.suyu_emu.utils.AddonUtil
import dev.suyu.suyu_emu.utils.FileUtil.copyFilesTo
import dev.suyu.suyu_emu.utils.ViewUtils.updateMargins
import dev.suyu.suyu_emu.utils.collect
import java.io.File
class AddonsFragment : Fragment() {

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.fragments
package dev.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.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
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.adapters.AppletAdapter
import dev.suyu.suyu_emu.databinding.FragmentAppletLauncherBinding
import dev.suyu.suyu_emu.model.Applet
import dev.suyu.suyu_emu.model.AppletInfo
import dev.suyu.suyu_emu.model.HomeViewModel
import dev.suyu.suyu_emu.utils.ViewUtils.updateMargins
class AppletLauncherFragment : Fragment() {
private var _binding: FragmentAppletLauncherBinding? = null

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.fragments
package dev.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.suyu.suyu_emu.R
import org.suyu.suyu_emu.adapters.CabinetLauncherDialogAdapter
import org.suyu.suyu_emu.databinding.DialogListBinding
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.adapters.CabinetLauncherDialogAdapter
import dev.suyu.suyu_emu.databinding.DialogListBinding
class CabinetLauncherDialogFragment : DialogFragment() {
private lateinit var binding: DialogListBinding

View file

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.suyu.suyu_emu.fragments
package dev.suyu.suyu_emu.fragments
import android.app.Dialog
import android.content.DialogInterface
@ -10,10 +10,10 @@ import androidx.fragment.app.DialogFragment
import androidx.fragment.app.activityViewModels
import androidx.preference.PreferenceManager
import com.google.android.material.dialog.MaterialAlertDialogBuilder
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
import dev.suyu.suyu_emu.R
import dev.suyu.suyu_emu.SuyuApplication
import dev.suyu.suyu_emu.model.AddonViewModel
import dev.suyu.suyu_emu.ui.main.MainActivity
class ContentTypeSelectionDialogFragment : DialogFragment() {
private val addonViewModel: AddonViewModel by activityViewModels()

Some files were not shown because too many files have changed in this diff Show more