diff options
Diffstat (limited to 'src/android')
47 files changed, 202 insertions, 358 deletions
diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts index 188ef9469..cb026211c 100644 --- a/src/android/app/build.gradle.kts +++ b/src/android/app/build.gradle.kts @@ -3,8 +3,8 @@ import android.annotation.SuppressLint import kotlin.collections.setOf -import org.jetbrains.kotlin.konan.properties.Properties import org.jlleitschuh.gradle.ktlint.reporter.ReporterType +import com.github.triplet.gradle.androidpublisher.ReleaseStatus plugins { id("com.android.application") @@ -13,6 +13,7 @@ plugins { kotlin("plugin.serialization") version "1.9.20" id("androidx.navigation.safeargs.kotlin") id("org.jlleitschuh.gradle.ktlint") version "11.4.0" + id("com.github.triplet.play") version "3.8.6" } /** @@ -58,15 +59,7 @@ android { targetSdk = 34 versionName = getGitVersion() - // If you want to use autoVersion for the versionCode, create a property in local.properties - // named "autoVersioned" and set it to "true" - val properties = Properties() - val versionProperty = try { - properties.load(project.rootProject.file("local.properties").inputStream()) - properties.getProperty("autoVersioned") ?: "" - } catch (e: Exception) { "" } - - versionCode = if (versionProperty == "true") { + versionCode = if (System.getenv("AUTO_VERSIONED") == "true") { autoVersion } else { 1 @@ -221,6 +214,15 @@ ktlint { } } +play { + val keyPath = System.getenv("SERVICE_ACCOUNT_KEY_PATH") + if (keyPath != null) { + serviceAccountCredentials.set(File(keyPath)) + } + track.set(System.getenv("STORE_TRACK") ?: "internal") + releaseStatus.set(ReleaseStatus.COMPLETED) +} + dependencies { implementation("androidx.core:core-ktx:1.12.0") implementation("androidx.appcompat:appcompat:1.6.1") @@ -257,12 +259,18 @@ fun runGitCommand(command: List<String>): String { } fun getGitVersion(): String { + val gitVersion = runGitCommand( + listOf( + "git", + "describe", + "--always", + "--long" + ) + ).replace(Regex("(-0)?-[^-]+$"), "") val versionName = if (System.getenv("GITHUB_ACTIONS") != null) { - val gitTag = System.getenv("GIT_TAG_NAME") ?: "" - gitTag + System.getenv("GIT_TAG_NAME") ?: gitVersion } else { - runGitCommand(listOf("git", "describe", "--always", "--long")) - .replace(Regex("(-0)?-[^-]+$"), "") + gitVersion } return versionName.ifEmpty { "0.0" } } diff --git a/src/android/app/src/main/AndroidManifest.xml b/src/android/app/src/main/AndroidManifest.xml index f011bd696..7890b30ca 100644 --- a/src/android/app/src/main/AndroidManifest.xml +++ b/src/android/app/src/main/AndroidManifest.xml @@ -12,8 +12,6 @@ SPDX-License-Identifier: GPL-3.0-or-later <uses-feature android:name="android.hardware.vulkan.version" android:version="0x401000" android:required="true" /> <uses-permission android:name="android.permission.INTERNET" /> - <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> - <uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" /> <uses-permission android:name="android.permission.NFC" /> <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> @@ -80,10 +78,6 @@ SPDX-License-Identifier: GPL-3.0-or-later android:resource="@xml/nfc_tech_filter" /> </activity> - <service android:name="org.yuzu.yuzu_emu.utils.ForegroundService" android:foregroundServiceType="specialUse"> - <property android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE" android:value="Keep emulation running in background"/> - </service> - <provider android:name=".features.DocumentProvider" android:authorities="${applicationId}.user" diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.kt index d114bd53d..76778c10a 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.kt @@ -17,17 +17,6 @@ fun Context.getPublicFilesDir(): File = getExternalFilesDir(null) ?: filesDir class YuzuApplication : Application() { private fun createNotificationChannels() { - val emulationChannel = NotificationChannel( - getString(R.string.emulation_notification_channel_id), - getString(R.string.emulation_notification_channel_name), - NotificationManager.IMPORTANCE_LOW - ) - emulationChannel.description = getString( - R.string.emulation_notification_channel_description - ) - emulationChannel.setSound(null, null) - emulationChannel.vibrationPattern = null - val noticeChannel = NotificationChannel( getString(R.string.notice_notification_channel_id), getString(R.string.notice_notification_channel_name), @@ -39,7 +28,6 @@ class YuzuApplication : Application() { // Register the channel with the system; you can't change the importance // or other notification behaviors after this val notificationManager = getSystemService(NotificationManager::class.java) - notificationManager.createNotificationChannel(emulationChannel) notificationManager.createNotificationChannel(noticeChannel) } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt index 564aaf305..7a8d03610 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt @@ -4,7 +4,6 @@ package org.yuzu.yuzu_emu.activities import android.annotation.SuppressLint -import android.app.Activity import android.app.PendingIntent import android.app.PictureInPictureParams import android.app.RemoteAction @@ -45,7 +44,6 @@ 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.ForegroundService import org.yuzu.yuzu_emu.utils.InputHandler import org.yuzu.yuzu_emu.utils.Log import org.yuzu.yuzu_emu.utils.MemoryUtil @@ -74,11 +72,6 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { private val emulationViewModel: EmulationViewModel by viewModels() - override fun onDestroy() { - stopForegroundService(this) - super.onDestroy() - } - override fun onCreate(savedInstanceState: Bundle?) { Log.gameLaunched = true ThemeHelper.setTheme(this) @@ -125,10 +118,6 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { .apply() } } - - // Start a foreground service to prevent the app from getting killed in the background - val startIntent = Intent(this, ForegroundService::class.java) - startForegroundService(startIntent) } override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean { @@ -481,12 +470,6 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { activity.startActivity(launcher) } - fun stopForegroundService(activity: Activity) { - val startIntent = Intent(activity, ForegroundService::class.java) - startIntent.action = ForegroundService.ACTION_STOP - activity.startForegroundService(startIntent) - } - private fun areCoordinatesOutside(view: View?, x: Float, y: Float): Boolean { if (view == null) { return true diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt index 86bd33672..664478472 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt @@ -25,7 +25,8 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting { HAPTIC_FEEDBACK("haptic_feedback"), SHOW_PERFORMANCE_OVERLAY("show_performance_overlay"), SHOW_INPUT_OVERLAY("show_input_overlay"), - TOUCHSCREEN("touchscreen"); + TOUCHSCREEN("touchscreen"), + SHOW_THERMAL_OVERLAY("show_thermal_overlay"); override fun getBoolean(needsGlobal: Boolean): Boolean = NativeConfig.getBoolean(key, needsGlobal) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt index d7ab0b5d9..6f6e7be10 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt @@ -8,7 +8,6 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.view.ViewGroup.MarginLayoutParams import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat import androidx.core.view.updatePadding @@ -27,6 +26,7 @@ import org.yuzu.yuzu_emu.R import org.yuzu.yuzu_emu.databinding.FragmentSettingsBinding import org.yuzu.yuzu_emu.features.settings.model.Settings import org.yuzu.yuzu_emu.model.SettingsViewModel +import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins class SettingsFragment : Fragment() { private lateinit var presenter: SettingsFragmentPresenter @@ -125,18 +125,10 @@ class SettingsFragment : Fragment() { val leftInsets = barInsets.left + cutoutInsets.left val rightInsets = barInsets.right + cutoutInsets.right - val mlpSettingsList = binding.listSettings.layoutParams as MarginLayoutParams - mlpSettingsList.leftMargin = leftInsets - mlpSettingsList.rightMargin = rightInsets - binding.listSettings.layoutParams = mlpSettingsList - binding.listSettings.updatePadding( - bottom = barInsets.bottom - ) - - val mlpAppBar = binding.appbarSettings.layoutParams as MarginLayoutParams - mlpAppBar.leftMargin = leftInsets - mlpAppBar.rightMargin = rightInsets - binding.appbarSettings.layoutParams = mlpAppBar + binding.listSettings.updateMargins(left = leftInsets, right = rightInsets) + binding.listSettings.updatePadding(bottom = barInsets.bottom) + + binding.appbarSettings.updateMargins(left = leftInsets, right = rightInsets) windowInsets } } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt index 5ab38ffda..ff4f0e5df 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt @@ -13,7 +13,6 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.view.ViewGroup.MarginLayoutParams import android.widget.Toast import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat @@ -26,6 +25,7 @@ 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 class AboutFragment : Fragment() { private var _binding: FragmentAboutBinding? = null @@ -114,15 +114,8 @@ class AboutFragment : Fragment() { val leftInsets = barInsets.left + cutoutInsets.left val rightInsets = barInsets.right + cutoutInsets.right - val mlpToolbar = binding.toolbarAbout.layoutParams as MarginLayoutParams - mlpToolbar.leftMargin = leftInsets - mlpToolbar.rightMargin = rightInsets - binding.toolbarAbout.layoutParams = mlpToolbar - - val mlpScrollAbout = binding.scrollAbout.layoutParams as MarginLayoutParams - mlpScrollAbout.leftMargin = leftInsets - mlpScrollAbout.rightMargin = rightInsets - binding.scrollAbout.layoutParams = mlpScrollAbout + binding.toolbarAbout.updateMargins(left = leftInsets, right = rightInsets) + binding.scrollAbout.updateMargins(left = leftInsets, right = rightInsets) binding.contentAbout.updatePadding(bottom = barInsets.bottom) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AddonsFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AddonsFragment.kt index adb65812c..f5647fa95 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AddonsFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AddonsFragment.kt @@ -31,6 +31,7 @@ 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 java.io.File class AddonsFragment : Fragment() { @@ -202,27 +203,19 @@ class AddonsFragment : Fragment() { val leftInsets = barInsets.left + cutoutInsets.left val rightInsets = barInsets.right + cutoutInsets.right - val mlpToolbar = binding.toolbarAddons.layoutParams as ViewGroup.MarginLayoutParams - mlpToolbar.leftMargin = leftInsets - mlpToolbar.rightMargin = rightInsets - binding.toolbarAddons.layoutParams = mlpToolbar - - val mlpAddonsList = binding.listAddons.layoutParams as ViewGroup.MarginLayoutParams - mlpAddonsList.leftMargin = leftInsets - mlpAddonsList.rightMargin = rightInsets - binding.listAddons.layoutParams = mlpAddonsList + binding.toolbarAddons.updateMargins(left = leftInsets, right = rightInsets) + binding.listAddons.updateMargins(left = leftInsets, right = rightInsets) binding.listAddons.updatePadding( bottom = barInsets.bottom + resources.getDimensionPixelSize(R.dimen.spacing_bottom_list_fab) ) val fabSpacing = resources.getDimensionPixelSize(R.dimen.spacing_fab) - val mlpFab = - binding.buttonInstall.layoutParams as ViewGroup.MarginLayoutParams - mlpFab.leftMargin = leftInsets + fabSpacing - mlpFab.rightMargin = rightInsets + fabSpacing - mlpFab.bottomMargin = barInsets.bottom + fabSpacing - binding.buttonInstall.layoutParams = mlpFab + binding.buttonInstall.updateMargins( + left = leftInsets + fabSpacing, + right = rightInsets + fabSpacing, + bottom = barInsets.bottom + fabSpacing + ) windowInsets } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AppletLauncherFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AppletLauncherFragment.kt index 1f66b440d..73ca40484 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AppletLauncherFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AppletLauncherFragment.kt @@ -21,6 +21,7 @@ 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 class AppletLauncherFragment : Fragment() { private var _binding: FragmentAppletLauncherBinding? = null @@ -95,16 +96,8 @@ class AppletLauncherFragment : Fragment() { val leftInsets = barInsets.left + cutoutInsets.left val rightInsets = barInsets.right + cutoutInsets.right - val mlpAppBar = binding.toolbarApplets.layoutParams as ViewGroup.MarginLayoutParams - mlpAppBar.leftMargin = leftInsets - mlpAppBar.rightMargin = rightInsets - binding.toolbarApplets.layoutParams = mlpAppBar - - val mlpListApplets = - binding.listApplets.layoutParams as ViewGroup.MarginLayoutParams - mlpListApplets.leftMargin = leftInsets - mlpListApplets.rightMargin = rightInsets - binding.listApplets.layoutParams = mlpListApplets + binding.toolbarApplets.updateMargins(left = leftInsets, right = rightInsets) + binding.listApplets.updateMargins(left = leftInsets, right = rightInsets) binding.listApplets.updatePadding(bottom = barInsets.bottom) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/DriverManagerFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/DriverManagerFragment.kt index bf017cd7c..41cff46c1 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/DriverManagerFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/DriverManagerFragment.kt @@ -34,6 +34,7 @@ import org.yuzu.yuzu_emu.model.HomeViewModel import org.yuzu.yuzu_emu.utils.FileUtil import org.yuzu.yuzu_emu.utils.GpuDriverHelper import org.yuzu.yuzu_emu.utils.NativeConfig +import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins import java.io.File import java.io.IOException @@ -141,23 +142,15 @@ class DriverManagerFragment : Fragment() { val leftInsets = barInsets.left + cutoutInsets.left val rightInsets = barInsets.right + cutoutInsets.right - val mlpAppBar = binding.toolbarDrivers.layoutParams as ViewGroup.MarginLayoutParams - mlpAppBar.leftMargin = leftInsets - mlpAppBar.rightMargin = rightInsets - binding.toolbarDrivers.layoutParams = mlpAppBar - - val mlplistDrivers = binding.listDrivers.layoutParams as ViewGroup.MarginLayoutParams - mlplistDrivers.leftMargin = leftInsets - mlplistDrivers.rightMargin = rightInsets - binding.listDrivers.layoutParams = mlplistDrivers + binding.toolbarDrivers.updateMargins(left = leftInsets, right = rightInsets) + binding.listDrivers.updateMargins(left = leftInsets, right = rightInsets) val fabSpacing = resources.getDimensionPixelSize(R.dimen.spacing_fab) - val mlpFab = - binding.buttonInstall.layoutParams as ViewGroup.MarginLayoutParams - mlpFab.leftMargin = leftInsets + fabSpacing - mlpFab.rightMargin = rightInsets + fabSpacing - mlpFab.bottomMargin = barInsets.bottom + fabSpacing - binding.buttonInstall.layoutParams = mlpFab + binding.buttonInstall.updateMargins( + left = leftInsets + fabSpacing, + right = rightInsets + fabSpacing, + bottom = barInsets.bottom + fabSpacing + ) binding.listDrivers.updatePadding( bottom = barInsets.bottom + diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EarlyAccessFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EarlyAccessFragment.kt index dbc16da4a..0534b68ce 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EarlyAccessFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EarlyAccessFragment.kt @@ -19,6 +19,7 @@ import com.google.android.material.transition.MaterialSharedAxis import org.yuzu.yuzu_emu.R import org.yuzu.yuzu_emu.databinding.FragmentEarlyAccessBinding import org.yuzu.yuzu_emu.model.HomeViewModel +import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins class EarlyAccessFragment : Fragment() { private var _binding: FragmentEarlyAccessBinding? = null @@ -73,10 +74,7 @@ class EarlyAccessFragment : Fragment() { val leftInsets = barInsets.left + cutoutInsets.left val rightInsets = barInsets.right + cutoutInsets.right - val mlpAppBar = binding.appbarEa.layoutParams as ViewGroup.MarginLayoutParams - mlpAppBar.leftMargin = leftInsets - mlpAppBar.rightMargin = rightInsets - binding.appbarEa.layoutParams = mlpAppBar + binding.appbarEa.updateMargins(left = leftInsets, right = rightInsets) binding.scrollEa.updatePadding( left = leftInsets, diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt index 937b8faf1..44af896da 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt @@ -13,6 +13,7 @@ import android.net.Uri import android.os.Bundle import android.os.Handler import android.os.Looper +import android.os.PowerManager import android.os.SystemClock import android.view.* import android.widget.TextView @@ -23,6 +24,7 @@ import androidx.core.content.res.ResourcesCompat import androidx.core.graphics.Insets import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat +import androidx.core.view.updatePadding import androidx.drawerlayout.widget.DrawerLayout import androidx.drawerlayout.widget.DrawerLayout.DrawerListener import androidx.fragment.app.Fragment @@ -38,7 +40,6 @@ import androidx.window.layout.WindowLayoutInfo import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.slider.Slider import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.flow.collect import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.launch import org.yuzu.yuzu_emu.HomeNavigationDirections @@ -64,6 +65,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { private lateinit var emulationState: EmulationState private var emulationActivity: EmulationActivity? = null private var perfStatsUpdater: (() -> Unit)? = null + private var thermalStatsUpdater: (() -> Unit)? = null private var _binding: FragmentEmulationBinding? = null private val binding get() = _binding!! @@ -77,6 +79,8 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { private var isInFoldableLayout = false + private lateinit var powerManager: PowerManager + override fun onAttach(context: Context) { super.onAttach(context) if (context is EmulationActivity) { @@ -102,6 +106,8 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { super.onCreate(savedInstanceState) updateOrientation() + powerManager = requireContext().getSystemService(Context.POWER_SERVICE) as PowerManager + val intentUri: Uri? = requireActivity().intent.data var intentGame: Game? = null if (intentUri != null) { @@ -394,8 +400,9 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { emulationState.updateSurface() - // Setup overlay + // Setup overlays updateShowFpsOverlay() + updateThermalOverlay() } } } @@ -553,6 +560,38 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { } } + private fun updateThermalOverlay() { + if (BooleanSetting.SHOW_THERMAL_OVERLAY.getBoolean()) { + thermalStatsUpdater = { + if (emulationViewModel.emulationStarted.value && + !emulationViewModel.isEmulationStopping.value + ) { + val thermalStatus = when (powerManager.currentThermalStatus) { + PowerManager.THERMAL_STATUS_LIGHT -> "😥" + PowerManager.THERMAL_STATUS_MODERATE -> "🥵" + PowerManager.THERMAL_STATUS_SEVERE -> "🔥" + PowerManager.THERMAL_STATUS_CRITICAL, + PowerManager.THERMAL_STATUS_EMERGENCY, + PowerManager.THERMAL_STATUS_SHUTDOWN -> "☢️" + + else -> "🙂" + } + if (_binding != null) { + binding.showThermalsText.text = thermalStatus + } + thermalStatsUpdateHandler.postDelayed(thermalStatsUpdater!!, 1000) + } + } + thermalStatsUpdateHandler.post(thermalStatsUpdater!!) + binding.showThermalsText.visibility = View.VISIBLE + } else { + if (thermalStatsUpdater != null) { + thermalStatsUpdateHandler.removeCallbacks(thermalStatsUpdater!!) + } + binding.showThermalsText.visibility = View.GONE + } + } + @SuppressLint("SourceLockedOrientationActivity") private fun updateOrientation() { emulationActivity?.let { @@ -641,6 +680,8 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { popup.menu.apply { findItem(R.id.menu_toggle_fps).isChecked = BooleanSetting.SHOW_PERFORMANCE_OVERLAY.getBoolean() + findItem(R.id.thermal_indicator).isChecked = + BooleanSetting.SHOW_THERMAL_OVERLAY.getBoolean() findItem(R.id.menu_rel_stick_center).isChecked = BooleanSetting.JOYSTICK_REL_CENTER.getBoolean() findItem(R.id.menu_dpad_slide).isChecked = BooleanSetting.DPAD_SLIDE.getBoolean() @@ -660,6 +701,13 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { true } + R.id.thermal_indicator -> { + it.isChecked = !it.isChecked + BooleanSetting.SHOW_THERMAL_OVERLAY.setBoolean(it.isChecked) + updateThermalOverlay() + true + } + R.id.menu_edit_overlay -> { binding.drawerLayout.close() binding.surfaceInputOverlay.requestFocus() @@ -850,7 +898,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { right = cutInsets.right } - v.setPadding(left, cutInsets.top, right, 0) + v.updatePadding(left = left, top = cutInsets.top, right = right) windowInsets } } @@ -1003,5 +1051,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { companion object { private val perfStatsUpdateHandler = Handler(Looper.myLooper()!!) + private val thermalStatsUpdateHandler = Handler(Looper.myLooper()!!) } } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GameFoldersFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GameFoldersFragment.kt index 341a37fdb..5c558b1a5 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GameFoldersFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GameFoldersFragment.kt @@ -26,6 +26,7 @@ import org.yuzu.yuzu_emu.databinding.FragmentFoldersBinding import org.yuzu.yuzu_emu.model.GamesViewModel import org.yuzu.yuzu_emu.model.HomeViewModel import org.yuzu.yuzu_emu.ui.main.MainActivity +import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins class GameFoldersFragment : Fragment() { private var _binding: FragmentFoldersBinding? = null @@ -100,23 +101,16 @@ class GameFoldersFragment : Fragment() { val leftInsets = barInsets.left + cutoutInsets.left val rightInsets = barInsets.right + cutoutInsets.right - val mlpToolbar = binding.toolbarFolders.layoutParams as ViewGroup.MarginLayoutParams - mlpToolbar.leftMargin = leftInsets - mlpToolbar.rightMargin = rightInsets - binding.toolbarFolders.layoutParams = mlpToolbar + binding.toolbarFolders.updateMargins(left = leftInsets, right = rightInsets) val fabSpacing = resources.getDimensionPixelSize(R.dimen.spacing_fab) - val mlpFab = - binding.buttonAdd.layoutParams as ViewGroup.MarginLayoutParams - mlpFab.leftMargin = leftInsets + fabSpacing - mlpFab.rightMargin = rightInsets + fabSpacing - mlpFab.bottomMargin = barInsets.bottom + fabSpacing - binding.buttonAdd.layoutParams = mlpFab - - val mlpListFolders = binding.listFolders.layoutParams as ViewGroup.MarginLayoutParams - mlpListFolders.leftMargin = leftInsets - mlpListFolders.rightMargin = rightInsets - binding.listFolders.layoutParams = mlpListFolders + binding.buttonAdd.updateMargins( + left = leftInsets + fabSpacing, + right = rightInsets + fabSpacing, + bottom = barInsets.bottom + fabSpacing + ) + + binding.listFolders.updateMargins(left = leftInsets, right = rightInsets) binding.listFolders.updatePadding( bottom = barInsets.bottom + diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GameInfoFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GameInfoFragment.kt index 5aa3f453f..dbd56e84f 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GameInfoFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GameInfoFragment.kt @@ -27,6 +27,7 @@ import org.yuzu.yuzu_emu.databinding.FragmentGameInfoBinding import org.yuzu.yuzu_emu.model.GameVerificationResult import org.yuzu.yuzu_emu.model.HomeViewModel import org.yuzu.yuzu_emu.utils.GameMetadata +import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins class GameInfoFragment : Fragment() { private var _binding: FragmentGameInfoBinding? = null @@ -122,11 +123,13 @@ class GameInfoFragment : Fragment() { titleId = R.string.verify_success, descriptionId = R.string.operation_completed_successfully ) + GameVerificationResult.Failed -> MessageDialogFragment.newInstance( titleId = R.string.verify_failure, descriptionId = R.string.verify_failure_description ) + GameVerificationResult.NotImplemented -> MessageDialogFragment.newInstance( titleId = R.string.verify_no_result, @@ -165,15 +168,8 @@ class GameInfoFragment : Fragment() { val leftInsets = barInsets.left + cutoutInsets.left val rightInsets = barInsets.right + cutoutInsets.right - val mlpToolbar = binding.toolbarInfo.layoutParams as ViewGroup.MarginLayoutParams - mlpToolbar.leftMargin = leftInsets - mlpToolbar.rightMargin = rightInsets - binding.toolbarInfo.layoutParams = mlpToolbar - - val mlpScrollAbout = binding.scrollInfo.layoutParams as ViewGroup.MarginLayoutParams - mlpScrollAbout.leftMargin = leftInsets - mlpScrollAbout.rightMargin = rightInsets - binding.scrollInfo.layoutParams = mlpScrollAbout + binding.toolbarInfo.updateMargins(left = leftInsets, right = rightInsets) + binding.scrollInfo.updateMargins(left = leftInsets, right = rightInsets) binding.contentInfo.updatePadding(bottom = barInsets.bottom) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GamePropertiesFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GamePropertiesFragment.kt index 582df0133..d14b2c634 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GamePropertiesFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/GamePropertiesFragment.kt @@ -46,6 +46,7 @@ import org.yuzu.yuzu_emu.utils.FileUtil import org.yuzu.yuzu_emu.utils.GameIconUtils import org.yuzu.yuzu_emu.utils.GpuDriverHelper import org.yuzu.yuzu_emu.utils.MemoryUtil +import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins import java.io.BufferedOutputStream import java.io.File @@ -320,46 +321,25 @@ class GamePropertiesFragment : Fragment() { val smallLayout = resources.getBoolean(R.bool.small_layout) if (smallLayout) { - val mlpListAll = - binding.listAll.layoutParams as ViewGroup.MarginLayoutParams - mlpListAll.leftMargin = leftInsets - mlpListAll.rightMargin = rightInsets - binding.listAll.layoutParams = mlpListAll + binding.listAll.updateMargins(left = leftInsets, right = rightInsets) } else { if (ViewCompat.getLayoutDirection(binding.root) == ViewCompat.LAYOUT_DIRECTION_LTR ) { - val mlpListAll = - binding.listAll.layoutParams as ViewGroup.MarginLayoutParams - mlpListAll.rightMargin = rightInsets - binding.listAll.layoutParams = mlpListAll - - val mlpIconLayout = - binding.iconLayout!!.layoutParams as ViewGroup.MarginLayoutParams - mlpIconLayout.topMargin = barInsets.top - mlpIconLayout.leftMargin = leftInsets - binding.iconLayout!!.layoutParams = mlpIconLayout + binding.listAll.updateMargins(right = rightInsets) + binding.iconLayout!!.updateMargins(top = barInsets.top, left = leftInsets) } else { - val mlpListAll = - binding.listAll.layoutParams as ViewGroup.MarginLayoutParams - mlpListAll.leftMargin = leftInsets - binding.listAll.layoutParams = mlpListAll - - val mlpIconLayout = - binding.iconLayout!!.layoutParams as ViewGroup.MarginLayoutParams - mlpIconLayout.topMargin = barInsets.top - mlpIconLayout.rightMargin = rightInsets - binding.iconLayout!!.layoutParams = mlpIconLayout + binding.listAll.updateMargins(left = leftInsets) + binding.iconLayout!!.updateMargins(top = barInsets.top, right = rightInsets) } } val fabSpacing = resources.getDimensionPixelSize(R.dimen.spacing_fab) - val mlpFab = - binding.buttonStart.layoutParams as ViewGroup.MarginLayoutParams - mlpFab.leftMargin = leftInsets + fabSpacing - mlpFab.rightMargin = rightInsets + fabSpacing - mlpFab.bottomMargin = barInsets.bottom + fabSpacing - binding.buttonStart.layoutParams = mlpFab + binding.buttonStart.updateMargins( + left = leftInsets + fabSpacing, + right = rightInsets + fabSpacing, + bottom = barInsets.bottom + fabSpacing + ) binding.layoutAll.updatePadding( top = barInsets.top, diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt index 1f3578b22..87e130d3e 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt @@ -12,7 +12,6 @@ import android.provider.DocumentsContract import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.view.ViewGroup.MarginLayoutParams import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import androidx.core.app.ActivityCompat @@ -44,6 +43,7 @@ import org.yuzu.yuzu_emu.ui.main.MainActivity import org.yuzu.yuzu_emu.utils.FileUtil import org.yuzu.yuzu_emu.utils.GpuDriverHelper import org.yuzu.yuzu_emu.utils.Log +import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins class HomeSettingsFragment : Fragment() { private var _binding: FragmentHomeSettingsBinding? = null @@ -408,10 +408,7 @@ class HomeSettingsFragment : Fragment() { bottom = barInsets.bottom ) - val mlpScrollSettings = binding.scrollViewSettings.layoutParams as MarginLayoutParams - mlpScrollSettings.leftMargin = leftInsets - mlpScrollSettings.rightMargin = rightInsets - binding.scrollViewSettings.layoutParams = mlpScrollSettings + binding.scrollViewSettings.updateMargins(left = leftInsets, right = rightInsets) binding.linearLayoutSettings.updatePadding(bottom = spacingNavigation) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/InstallableFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/InstallableFragment.kt index 7df8e6bf4..63112dc6f 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/InstallableFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/InstallableFragment.kt @@ -34,6 +34,7 @@ import org.yuzu.yuzu_emu.model.TaskState import org.yuzu.yuzu_emu.ui.main.MainActivity import org.yuzu.yuzu_emu.utils.DirectoryInitialization import org.yuzu.yuzu_emu.utils.FileUtil +import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins import java.io.BufferedOutputStream import java.io.File import java.math.BigInteger @@ -172,16 +173,8 @@ class InstallableFragment : Fragment() { val leftInsets = barInsets.left + cutoutInsets.left val rightInsets = barInsets.right + cutoutInsets.right - val mlpAppBar = binding.toolbarInstallables.layoutParams as ViewGroup.MarginLayoutParams - mlpAppBar.leftMargin = leftInsets - mlpAppBar.rightMargin = rightInsets - binding.toolbarInstallables.layoutParams = mlpAppBar - - val mlpScrollAbout = - binding.listInstallables.layoutParams as ViewGroup.MarginLayoutParams - mlpScrollAbout.leftMargin = leftInsets - mlpScrollAbout.rightMargin = rightInsets - binding.listInstallables.layoutParams = mlpScrollAbout + binding.toolbarInstallables.updateMargins(left = leftInsets, right = rightInsets) + binding.listInstallables.updateMargins(left = leftInsets, right = rightInsets) binding.listInstallables.updatePadding(bottom = barInsets.bottom) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/LicensesFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/LicensesFragment.kt index b6e9129f7..f17f621f8 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/LicensesFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/LicensesFragment.kt @@ -7,7 +7,6 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.view.ViewGroup.MarginLayoutParams import androidx.appcompat.app.AppCompatActivity import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat @@ -22,6 +21,7 @@ import org.yuzu.yuzu_emu.adapters.LicenseAdapter import org.yuzu.yuzu_emu.databinding.FragmentLicensesBinding import org.yuzu.yuzu_emu.model.HomeViewModel import org.yuzu.yuzu_emu.model.License +import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins class LicensesFragment : Fragment() { private var _binding: FragmentLicensesBinding? = null @@ -122,15 +122,8 @@ class LicensesFragment : Fragment() { val leftInsets = barInsets.left + cutoutInsets.left val rightInsets = barInsets.right + cutoutInsets.right - val mlpAppBar = binding.appbarLicenses.layoutParams as MarginLayoutParams - mlpAppBar.leftMargin = leftInsets - mlpAppBar.rightMargin = rightInsets - binding.appbarLicenses.layoutParams = mlpAppBar - - val mlpScrollAbout = binding.listLicenses.layoutParams as MarginLayoutParams - mlpScrollAbout.leftMargin = leftInsets - mlpScrollAbout.rightMargin = rightInsets - binding.listLicenses.layoutParams = mlpScrollAbout + binding.appbarLicenses.updateMargins(left = leftInsets, right = rightInsets) + binding.listLicenses.updateMargins(left = leftInsets, right = rightInsets) binding.listLicenses.updatePadding(bottom = barInsets.bottom) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SettingsSearchFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SettingsSearchFragment.kt index f95d545bf..a135b80b4 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SettingsSearchFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SettingsSearchFragment.kt @@ -29,6 +29,7 @@ import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter import org.yuzu.yuzu_emu.model.SettingsViewModel import org.yuzu.yuzu_emu.utils.NativeConfig +import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins class SettingsSearchFragment : Fragment() { private var _binding: FragmentSettingsSearchBinding? = null @@ -174,15 +175,14 @@ class SettingsSearchFragment : Fragment() { bottom = barInsets.bottom ) - val mlpSettingsList = binding.settingsList.layoutParams as ViewGroup.MarginLayoutParams - mlpSettingsList.leftMargin = leftInsets + sideMargin - mlpSettingsList.rightMargin = rightInsets + sideMargin - binding.settingsList.layoutParams = mlpSettingsList - - val mlpDivider = binding.divider.layoutParams as ViewGroup.MarginLayoutParams - mlpDivider.leftMargin = leftInsets + sideMargin - mlpDivider.rightMargin = rightInsets + sideMargin - binding.divider.layoutParams = mlpDivider + binding.settingsList.updateMargins( + left = leftInsets + sideMargin, + right = rightInsets + sideMargin + ) + binding.divider.updateMargins( + left = leftInsets + sideMargin, + right = rightInsets + sideMargin + ) windowInsets } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt index 54380323e..23ca49b53 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt @@ -8,7 +8,6 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.view.ViewGroup.MarginLayoutParams import androidx.appcompat.app.AppCompatActivity import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat @@ -27,6 +26,7 @@ import org.yuzu.yuzu_emu.databinding.FragmentGamesBinding import org.yuzu.yuzu_emu.layout.AutofitGridLayoutManager import org.yuzu.yuzu_emu.model.GamesViewModel import org.yuzu.yuzu_emu.model.HomeViewModel +import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins class GamesFragment : Fragment() { private var _binding: FragmentGamesBinding? = null @@ -169,15 +169,16 @@ class GamesFragment : Fragment() { val leftInsets = barInsets.left + cutoutInsets.left val rightInsets = barInsets.right + cutoutInsets.right - val mlpSwipe = binding.swipeRefresh.layoutParams as MarginLayoutParams + val left: Int + val right: Int if (ViewCompat.getLayoutDirection(view) == ViewCompat.LAYOUT_DIRECTION_LTR) { - mlpSwipe.leftMargin = leftInsets + spacingNavigationRail - mlpSwipe.rightMargin = rightInsets + left = leftInsets + spacingNavigationRail + right = rightInsets } else { - mlpSwipe.leftMargin = leftInsets - mlpSwipe.rightMargin = rightInsets + spacingNavigationRail + left = leftInsets + right = rightInsets + spacingNavigationRail } - binding.swipeRefresh.layoutParams = mlpSwipe + binding.swipeRefresh.updateMargins(left = left, right = right) binding.noticeText.updatePadding(bottom = spacingNavigation) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt index b3967d294..4df4ac4c6 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt @@ -34,7 +34,6 @@ import kotlinx.coroutines.launch import org.yuzu.yuzu_emu.HomeNavigationDirections import org.yuzu.yuzu_emu.NativeLibrary import org.yuzu.yuzu_emu.R -import org.yuzu.yuzu_emu.activities.EmulationActivity import org.yuzu.yuzu_emu.databinding.ActivityMainBinding import org.yuzu.yuzu_emu.features.settings.model.Settings import org.yuzu.yuzu_emu.fragments.AddGameFolderDialogFragment @@ -177,9 +176,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider { } } - // Dismiss previous notifications (should not happen unless a crash occurred) - EmulationActivity.stopForegroundService(this) - setInsets() } @@ -298,11 +294,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider { super.onResume() } - override fun onDestroy() { - EmulationActivity.stopForegroundService(this) - super.onDestroy() - } - private fun setInsets() = ViewCompat.setOnApplyWindowInsetsListener( binding.root diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ForegroundService.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ForegroundService.kt deleted file mode 100644 index 086d17606..000000000 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ForegroundService.kt +++ /dev/null @@ -1,70 +0,0 @@ -// SPDX-FileCopyrightText: 2023 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -package org.yuzu.yuzu_emu.utils - -import android.app.PendingIntent -import android.app.Service -import android.content.Intent -import android.os.IBinder -import androidx.core.app.NotificationCompat -import androidx.core.app.NotificationManagerCompat -import org.yuzu.yuzu_emu.R -import org.yuzu.yuzu_emu.activities.EmulationActivity - -/** - * A service that shows a permanent notification in the background to avoid the app getting - * cleared from memory by the system. - */ -class ForegroundService : Service() { - companion object { - const val EMULATION_RUNNING_NOTIFICATION = 0x1000 - - const val ACTION_STOP = "stop" - } - - private fun showRunningNotification() { - // Intent is used to resume emulation if the notification is clicked - val contentIntent = PendingIntent.getActivity( - this, - 0, - Intent(this, EmulationActivity::class.java), - PendingIntent.FLAG_IMMUTABLE - ) - val builder = - NotificationCompat.Builder(this, getString(R.string.emulation_notification_channel_id)) - .setSmallIcon(R.drawable.ic_stat_notification_logo) - .setContentTitle(getString(R.string.app_name)) - .setContentText(getString(R.string.emulation_notification_running)) - .setPriority(NotificationCompat.PRIORITY_LOW) - .setOngoing(true) - .setVibrate(null) - .setSound(null) - .setContentIntent(contentIntent) - startForeground(EMULATION_RUNNING_NOTIFICATION, builder.build()) - } - - override fun onBind(intent: Intent): IBinder? { - return null - } - - override fun onCreate() { - showRunningNotification() - } - - override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { - if (intent == null) { - return START_NOT_STICKY - } - if (intent.action == ACTION_STOP) { - NotificationManagerCompat.from(this).cancel(EMULATION_RUNNING_NOTIFICATION) - stopForeground(STOP_FOREGROUND_REMOVE) - stopSelfResult(startId) - } - return START_STICKY - } - - override fun onDestroy() { - NotificationManagerCompat.from(this).cancel(EMULATION_RUNNING_NOTIFICATION) - } -} diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ViewUtils.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ViewUtils.kt index f9a3e4126..ffbfa9337 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ViewUtils.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/ViewUtils.kt @@ -4,6 +4,7 @@ package org.yuzu.yuzu_emu.utils import android.view.View +import android.view.ViewGroup object ViewUtils { fun showView(view: View, length: Long = 300) { @@ -32,4 +33,28 @@ object ViewUtils { view.visibility = View.INVISIBLE }.start() } + + fun View.updateMargins( + left: Int = -1, + top: Int = -1, + right: Int = -1, + bottom: Int = -1 + ) { + val layoutParams = this.layoutParams as ViewGroup.MarginLayoutParams + layoutParams.apply { + if (left != -1) { + leftMargin = left + } + if (top != -1) { + topMargin = top + } + if (right != -1) { + rightMargin = right + } + if (bottom != -1) { + bottomMargin = bottom + } + } + this.layoutParams = layoutParams + } } diff --git a/src/android/app/src/main/jni/android_settings.h b/src/android/app/src/main/jni/android_settings.h index cf93304da..4a3bc8e53 100644 --- a/src/android/app/src/main/jni/android_settings.h +++ b/src/android/app/src/main/jni/android_settings.h @@ -60,6 +60,8 @@ struct Values { Settings::Category::Overlay}; Settings::Setting<bool> show_performance_overlay{linkage, true, "show_performance_overlay", Settings::Category::Overlay}; + Settings::Setting<bool> show_thermal_overlay{linkage, false, "show_thermal_overlay", + Settings::Category::Overlay}; Settings::Setting<bool> show_input_overlay{linkage, true, "show_input_overlay", Settings::Category::Overlay}; Settings::Setting<bool> touchscreen{linkage, true, "touchscreen", Settings::Category::Overlay}; diff --git a/src/android/app/src/main/res/layout/fragment_emulation.xml b/src/android/app/src/main/res/layout/fragment_emulation.xml index 0d2bfe8d6..e99a15783 100644 --- a/src/android/app/src/main/res/layout/fragment_emulation.xml +++ b/src/android/app/src/main/res/layout/fragment_emulation.xml @@ -140,6 +140,7 @@ android:id="@+id/overlay_container" android:layout_width="match_parent" android:layout_height="match_parent" + android:layout_marginHorizontal="20dp" android:fitsSystemWindows="true"> <com.google.android.material.textview.MaterialTextView @@ -150,7 +151,19 @@ android:layout_gravity="left" android:clickable="false" android:focusable="false" - android:paddingHorizontal="20dp" + android:textColor="@android:color/white" + android:shadowColor="@android:color/black" + android:shadowRadius="3" + tools:ignore="RtlHardcoded" /> + + <com.google.android.material.textview.MaterialTextView + android:id="@+id/show_thermals_text" + style="@style/TextAppearance.Material3.BodySmall" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="right" + android:clickable="false" + android:focusable="false" android:textColor="@android:color/white" android:shadowColor="@android:color/black" android:shadowRadius="3" diff --git a/src/android/app/src/main/res/menu/menu_overlay_options.xml b/src/android/app/src/main/res/menu/menu_overlay_options.xml index 363781652..a9e807427 100644 --- a/src/android/app/src/main/res/menu/menu_overlay_options.xml +++ b/src/android/app/src/main/res/menu/menu_overlay_options.xml @@ -7,6 +7,11 @@ android:checkable="true" /> <item + android:id="@+id/thermal_indicator" + android:title="@string/emulation_thermal_indicator" + android:checkable="true" /> + + <item android:id="@+id/menu_edit_overlay" android:title="@string/emulation_touch_overlay_edit" /> diff --git a/src/android/app/src/main/res/values-ar/strings.xml b/src/android/app/src/main/res/values-ar/strings.xml index 53678f465..41d741847 100644 --- a/src/android/app/src/main/res/values-ar/strings.xml +++ b/src/android/app/src/main/res/values-ar/strings.xml @@ -1,9 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> - <string name="emulation_notification_channel_name">المحاكي نشط</string> - <string name="emulation_notification_channel_description">اظهار اشعار دائم عندما يكون المحاكي نشطاً</string> - <string name="emulation_notification_running">يوزو قيد التشغيل</string> <string name="notice_notification_channel_name">الإشعارات والأخطاء</string> <string name="notice_notification_channel_description">اظهار اشعار عند حصول اي مشكلة.</string> <string name="notification_permission_not_granted">لم يتم منح إذن الإشعار</string> diff --git a/src/android/app/src/main/res/values-ckb/strings.xml b/src/android/app/src/main/res/values-ckb/strings.xml index 7e1eb2b8d..827339505 100644 --- a/src/android/app/src/main/res/values-ckb/strings.xml +++ b/src/android/app/src/main/res/values-ckb/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">ئەم نەرمەکاڵایە یارییەکانی کۆنسۆلی نینتێندۆ سویچ کارپێدەکات. هیچ ناونیشانێکی یاری و کلیلی تێدا نییە..<br /><br />پێش ئەوەی دەست پێ بکەیت، تکایە شوێنی فایلی <![CDATA[<b> prod.keys </b>]]> دیاریبکە لە نێو کۆگای ئامێرەکەت.<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">زیاتر فێربە</a>]]></string> - <string name="emulation_notification_channel_name">ئیمولەیشن کارایە</string> - <string name="emulation_notification_channel_description">ئاگادارکردنەوەیەکی بەردەوام نیشان دەدات کاتێک ئیمولەیشن کاردەکات.</string> - <string name="emulation_notification_running">یوزو کاردەکات</string> <string name="notice_notification_channel_name">ئاگاداری و هەڵەکان</string> <string name="notice_notification_channel_description">ئاگادارکردنەوەکان پیشان دەدات کاتێک شتێک بە هەڵەدا دەچێت.</string> <string name="notification_permission_not_granted">مۆڵەتی ئاگادارکردنەوە نەدراوە!</string> diff --git a/src/android/app/src/main/res/values-cs/strings.xml b/src/android/app/src/main/res/values-cs/strings.xml index b9a4a11e4..8f8e2848d 100644 --- a/src/android/app/src/main/res/values-cs/strings.xml +++ b/src/android/app/src/main/res/values-cs/strings.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> - <string name="emulation_notification_channel_name">Emulace je aktivní</string> <string name="notice_notification_channel_name">Upozornění a chyby</string> <string name="notice_notification_channel_description">Ukáže oznámení v případě chyby.</string> <string name="notification_permission_not_granted">Oznámení nejsou oprávněna!</string> diff --git a/src/android/app/src/main/res/values-de/strings.xml b/src/android/app/src/main/res/values-de/strings.xml index 483ea8c88..fb25b3c93 100644 --- a/src/android/app/src/main/res/values-de/strings.xml +++ b/src/android/app/src/main/res/values-de/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">Diese Software kann Spiele für die Nintendo Switch abspielen. Keine Spiele oder Spielekeys sind enthalten.<br /><br />Bevor du beginnst, bitte halte deine <![CDATA[<b> prod.keys </b>]]> auf deinem Gerät bereit. .<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">Mehr Infos</a>]]></string> - <string name="emulation_notification_channel_name">Emulation ist aktiv</string> - <string name="emulation_notification_channel_description">Zeigt eine dauerhafte Benachrichtigung an, wenn die Emulation läuft.</string> - <string name="emulation_notification_running">yuzu läuft</string> <string name="notice_notification_channel_name">Hinweise und Fehler</string> <string name="notice_notification_channel_description">Zeigt Benachrichtigungen an, wenn etwas schief läuft.</string> <string name="notification_permission_not_granted">Berechtigung für Benachrichtigungen nicht erlaubt!</string> diff --git a/src/android/app/src/main/res/values-es/strings.xml b/src/android/app/src/main/res/values-es/strings.xml index c3825710b..7ecbeaba4 100644 --- a/src/android/app/src/main/res/values-es/strings.xml +++ b/src/android/app/src/main/res/values-es/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">Este software ejecuta juegos para la videoconsola Nintendo Switch. Los videojuegos o claves no vienen incluidos.<br /><br />Antes de empezar, por favor, localice el archivo <![CDATA[<b> prod.keys </b>]]>en el almacenamiento de su dispositivo..<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">Saber más</a>]]></string> - <string name="emulation_notification_channel_name">Emulación activa</string> - <string name="emulation_notification_channel_description">Muestra una notificación persistente cuando la emulación está activa.</string> - <string name="emulation_notification_running">yuzu está ejecutándose</string> <string name="notice_notification_channel_name">Avisos y errores</string> <string name="notice_notification_channel_description">Mostrar notificaciones cuándo algo vaya mal.</string> <string name="notification_permission_not_granted">¡Permisos de notificación no concedidos!</string> diff --git a/src/android/app/src/main/res/values-fr/strings.xml b/src/android/app/src/main/res/values-fr/strings.xml index 667fe33cb..a848b9163 100644 --- a/src/android/app/src/main/res/values-fr/strings.xml +++ b/src/android/app/src/main/res/values-fr/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">Ce logiciel exécutera des jeux pour la console de jeu Nintendo Switch. Aucun jeux ou clés n\'est inclus.<br /><br />Avant de commencer, veuillez localiser votre fichier <![CDATA[<b> prod.keys </b>]]> sur le stockage de votre appareil.<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">En savoir plus</a>]]></string> - <string name="emulation_notification_channel_name">L\'émulation est active</string> - <string name="emulation_notification_channel_description">Affiche une notification persistante lorsque l\'émulation est en cours d\'exécution.</string> - <string name="emulation_notification_running">yuzu est en cours d\'exécution</string> <string name="notice_notification_channel_name">Avis et erreurs</string> <string name="notice_notification_channel_description">Affiche des notifications en cas de problème.</string> <string name="notification_permission_not_granted">Permission de notification non accordée !</string> diff --git a/src/android/app/src/main/res/values-he/strings.xml b/src/android/app/src/main/res/values-he/strings.xml index 41e4450c6..6096605a9 100644 --- a/src/android/app/src/main/res/values-he/strings.xml +++ b/src/android/app/src/main/res/values-he/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">התוכנה תריץ משחקים לקונסולת ה Nintendo Switch. אף משחק או קבצים בעלי זכויות יוצרים נכללים.<br /><br /> לפני שאת/ה מתחיל בבקשה מצא את קובץ <![CDATA[<b>prod.keys</b>]]> על המכשיר.<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">קרא עוד</a>]]></string> - <string name="emulation_notification_channel_name">אמולציה פעילה</string> - <string name="emulation_notification_channel_description">מציג התראה מתמשכת כאשר האמולציה פועלת.</string> - <string name="emulation_notification_running">yuzu רץ</string> <string name="notice_notification_channel_name">התראות ותקלות</string> <string name="notice_notification_channel_description">מציג התראות כאשר משהו הולך לא כשורה.</string> <string name="notification_permission_not_granted">הרשאות התראות לא ניתנה!</string> diff --git a/src/android/app/src/main/res/values-hu/strings.xml b/src/android/app/src/main/res/values-hu/strings.xml index 554da0816..f3a29e0c3 100644 --- a/src/android/app/src/main/res/values-hu/strings.xml +++ b/src/android/app/src/main/res/values-hu/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">Ez a szoftver Nintendo Switch játékkonzolhoz készült játékokat futtat. Nem tartalmaz játékokat vagy kulcsokat. .<br /><br />Mielőtt hozzákezdenél, kérjük, válaszd ki a <![CDATA[<b>prod.keys</b>]]> fájl helyét a készülék tárhelyén<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">Tudj meg többet</a>]]></string> - <string name="emulation_notification_channel_name">Emuláció aktív</string> - <string name="emulation_notification_channel_description">Állandó értesítést jelenít meg, amíg az emuláció fut.</string> - <string name="emulation_notification_running">A yuzu fut</string> <string name="notice_notification_channel_name">Megjegyzések és hibák</string> <string name="notice_notification_channel_description">Értesítések megjelenítése, ha valami rosszul sül el.</string> <string name="notification_permission_not_granted">Nincs engedély az értesítés megjelenítéséhez!</string> diff --git a/src/android/app/src/main/res/values-it/strings.xml b/src/android/app/src/main/res/values-it/strings.xml index 61b39f57f..433d84f5c 100644 --- a/src/android/app/src/main/res/values-it/strings.xml +++ b/src/android/app/src/main/res/values-it/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">Questo software permette di giocare ai giochi della console Nintendo Switch. Nessun gioco o chiave è inclusa.<br /><br />Prima di iniziare, perfavore individua il file <![CDATA[<b>prod.keys </b>]]> nella memoria del tuo dispositivo.<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">Scopri di più</a>]]></string> - <string name="emulation_notification_channel_name">L\'emulatore è attivo</string> - <string name="emulation_notification_channel_description">Mostra una notifica persistente quando l\'emulatore è in esecuzione.</string> - <string name="emulation_notification_running">yuzu è in esecuzione</string> <string name="notice_notification_channel_name">Avvisi ed errori</string> <string name="notice_notification_channel_description">Mostra le notifiche quando qualcosa va storto.</string> <string name="notification_permission_not_granted">Autorizzazione di notifica non concessa!</string> diff --git a/src/android/app/src/main/res/values-ja/strings.xml b/src/android/app/src/main/res/values-ja/strings.xml index 0cff40bb6..da73ad651 100644 --- a/src/android/app/src/main/res/values-ja/strings.xml +++ b/src/android/app/src/main/res/values-ja/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">このソフトウェアでは、Nintendo Switchのゲームを実行できます。 ゲームソフトやキーは含まれません。<br /><br />事前に、 <![CDATA[<b> prod.keys </b>]]> ファイルをストレージに配置しておいてください。<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">詳細</a>]]></string> - <string name="emulation_notification_channel_name">エミュレーションが有効です</string> - <string name="emulation_notification_channel_description">エミュレーションの実行中に常設通知を表示します。</string> - <string name="emulation_notification_running">yuzu は実行中です</string> <string name="notice_notification_channel_name">通知とエラー</string> <string name="notice_notification_channel_description">問題の発生時に通知を表示します。</string> <string name="notification_permission_not_granted">通知が許可されていません!</string> diff --git a/src/android/app/src/main/res/values-ko/strings.xml b/src/android/app/src/main/res/values-ko/strings.xml index eaa6c23ce..904353d34 100644 --- a/src/android/app/src/main/res/values-ko/strings.xml +++ b/src/android/app/src/main/res/values-ko/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">이 소프트웨어는 Nintendo Switch 게임을 실행합니다. 게임 타이틀이나 키는 포함되어 있지 않습니다.<br /><br />시작하기 전에 장치 저장소에서 <![CDATA[<b> prod.keys </b>]]> 파일을 찾아주세요.<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">자세히 알아보기</a>]]></string> - <string name="emulation_notification_channel_name">에뮬레이션이 활성화됨</string> - <string name="emulation_notification_channel_description">에뮬레이션이 실행 중일 때 지속적으로 알림을 표시합니다.</string> - <string name="emulation_notification_running">yuzu가 실행 중입니다.</string> <string name="notice_notification_channel_name">알림 및 오류</string> <string name="notice_notification_channel_description">문제가 발생하면 알림을 표시합니다.</string> <string name="notification_permission_not_granted">알림 권한이 부여되지 않았습니다!</string> diff --git a/src/android/app/src/main/res/values-nb/strings.xml b/src/android/app/src/main/res/values-nb/strings.xml index e92dc62d9..fe3af5920 100644 --- a/src/android/app/src/main/res/values-nb/strings.xml +++ b/src/android/app/src/main/res/values-nb/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">Denne programvaren vil kjøre spill for Nintendo Switch-spillkonsollen. Ingen spilltitler eller nøkler er inkludert.<br /><br />Før du begynner, må du finne <![CDATA[<b> prod.keys </b>]]> filen din på enhetslagringen.<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">Lær mer</a>]]></string> - <string name="emulation_notification_channel_name">Emulering er aktiv</string> - <string name="emulation_notification_channel_description">Viser et vedvarende varsel når emuleringen kjører.</string> - <string name="emulation_notification_running">Yuzu kjører</string> <string name="notice_notification_channel_name">Merknader og feil</string> <string name="notice_notification_channel_description">Viser varsler når noe går galt.</string> <string name="notification_permission_not_granted">Varslingstillatelse ikke gitt!</string> diff --git a/src/android/app/src/main/res/values-pl/strings.xml b/src/android/app/src/main/res/values-pl/strings.xml index fbd0ad7e9..2af7fd7b4 100644 --- a/src/android/app/src/main/res/values-pl/strings.xml +++ b/src/android/app/src/main/res/values-pl/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">To oprogramowanie umożliwia uruchomienie gier z konsoli Nintendo Switch. Nie zawiera gier ani wymaganych kluczy.<br /><br />Zanim zaczniesz, wybierz plik kluczy <![CDATA[<b> prod.keys </b>]]> z katalogu w pamięci masowej.<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">Dowiedz się więcej</a>]]></string> - <string name="emulation_notification_channel_name">Emulacja jest uruchomiona</string> - <string name="emulation_notification_channel_description">Pokaż trwałe powiadomienie gdy emulacja jest uruchomiona.</string> - <string name="emulation_notification_running">yuzu jest uruchomiony</string> <string name="notice_notification_channel_name">Powiadomienia błędy</string> <string name="notice_notification_channel_description">Pokaż powiadomienie gdy coś pójdzie źle</string> <string name="notification_permission_not_granted">Nie zezwolono na powiadomienia!</string> diff --git a/src/android/app/src/main/res/values-pt-rBR/strings.xml b/src/android/app/src/main/res/values-pt-rBR/strings.xml index a87eb11e4..130252590 100644 --- a/src/android/app/src/main/res/values-pt-rBR/strings.xml +++ b/src/android/app/src/main/res/values-pt-rBR/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">Este software executa jogos do console Nintendo Switch. Não estão inclusos nem jogos ou chaves.<br /><br />Antes de começar, por favor localize o arquivo <![CDATA[<b> prod.keys </b>]]> no armazenamento de seu dispositivo.<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">Saiba mais</a>]]></string> - <string name="emulation_notification_channel_name">A emulação está Ativa</string> - <string name="emulation_notification_channel_description">Mostra uma notificação permanente enquanto a emulação estiver em andamento.</string> - <string name="emulation_notification_running">O Yuzu está em execução </string> <string name="notice_notification_channel_name">Notificações e erros</string> <string name="notice_notification_channel_description">Mostra notificações quando algo dá errado.</string> <string name="notification_permission_not_granted">Acesso às notificações não concedido!</string> diff --git a/src/android/app/src/main/res/values-pt-rPT/strings.xml b/src/android/app/src/main/res/values-pt-rPT/strings.xml index 684a71616..0fdbae4f8 100644 --- a/src/android/app/src/main/res/values-pt-rPT/strings.xml +++ b/src/android/app/src/main/res/values-pt-rPT/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">Este software corre jogos para a consola Nintendo Switch. Não estão incluídas nem jogos ou chaves. <br /><br />Antes de começares, por favor localiza o ficheiro <![CDATA[1 prod.keys 1]]> no armazenamento do teu dispositivo.<br /><br /><![CDATA[2Learn more2]]></string> - <string name="emulation_notification_channel_name">Emulação está Ativa</string> - <string name="emulation_notification_channel_description">Mostra uma notificação permanente enquanto a emulação está a correr.</string> - <string name="emulation_notification_running">Yuzu está em execução </string> <string name="notice_notification_channel_name">Notificações e erros</string> <string name="notice_notification_channel_description">Mostra notificações quendo algo corre mal.</string> <string name="notification_permission_not_granted">Permissões de notificação não permitidas </string> diff --git a/src/android/app/src/main/res/values-ru/strings.xml b/src/android/app/src/main/res/values-ru/strings.xml index 099b2c9eb..2dfd4a824 100644 --- a/src/android/app/src/main/res/values-ru/strings.xml +++ b/src/android/app/src/main/res/values-ru/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">Это программное обеспечение позволяет запускать игры для игровой консоли Nintendo Switch. Мы не предоставляем сами игры или ключи.<br /><br />Перед началом работы найдите файл <![CDATA[<b> prod.keys </b>]]> в хранилище устройства..<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">Узнать больше</a>]]></string> - <string name="emulation_notification_channel_name">Эмуляция активна</string> - <string name="emulation_notification_channel_description">Показывает постоянное уведомление, когда запущена эмуляция.</string> - <string name="emulation_notification_running">yuzu запущен</string> <string name="notice_notification_channel_name">Уведомления и ошибки</string> <string name="notice_notification_channel_description">Показывать уведомления, когда что-то пошло не так</string> <string name="notification_permission_not_granted">Вы не предоставили разрешение на уведомления!</string> diff --git a/src/android/app/src/main/res/values-uk/strings.xml b/src/android/app/src/main/res/values-uk/strings.xml index 361f0b726..9a2804a93 100644 --- a/src/android/app/src/main/res/values-uk/strings.xml +++ b/src/android/app/src/main/res/values-uk/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">Це програмне забезпечення дозволяє запускати ігри для ігрової консолі Nintendo Switch. Ми не надаємо самі ігри або ключі.<br /><br />Перед початком роботи знайдіть ваш файл <![CDATA[<b> prod.keys </b>]]> у сховищі пристрою.<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">Дізнатися більше</a>]]></string> - <string name="emulation_notification_channel_name">Емуляція активна</string> - <string name="emulation_notification_channel_description">Показує постійне сповіщення, коли запущено емуляцію.</string> - <string name="emulation_notification_running">yuzu запущено</string> <string name="notice_notification_channel_name">Сповіщення та помилки</string> <string name="notice_notification_channel_description">Показувати сповіщення, коли щось пішло не так</string> <string name="notification_permission_not_granted">Ви не надали дозвіл сповіщень!</string> diff --git a/src/android/app/src/main/res/values-vi/strings.xml b/src/android/app/src/main/res/values-vi/strings.xml index 0a722f329..dc06610c7 100644 --- a/src/android/app/src/main/res/values-vi/strings.xml +++ b/src/android/app/src/main/res/values-vi/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">Phần mềm này sẽ chạy các game cho máy chơi game Nintendo Switch. Không có title games hoặc keys được bao gồm.<br /><br />Trước khi bạn bắt đầu, hãy tìm tập tin <![CDATA[<b> prod.keys </b>]]> trên bộ nhớ thiết bị của bạn.<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">Tìm hiểu thêm</a>]]></string> - <string name="emulation_notification_channel_name">Giả lập đang chạy</string> - <string name="emulation_notification_channel_description">Hiển thị thông báo liên tục khi giả lập đang chạy.</string> - <string name="emulation_notification_running">yuzu đang chạy</string> <string name="notice_notification_channel_name">Thông báo và lỗi</string> <string name="notice_notification_channel_description">Hiển thị thông báo khi có sự cố xảy ra.</string> <string name="notification_permission_not_granted">Ứng dụng không được cấp quyền thông báo!</string> diff --git a/src/android/app/src/main/res/values-zh-rCN/strings.xml b/src/android/app/src/main/res/values-zh-rCN/strings.xml index b840591a4..6acf6f391 100644 --- a/src/android/app/src/main/res/values-zh-rCN/strings.xml +++ b/src/android/app/src/main/res/values-zh-rCN/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">此软件可以运行 Nintendo Switch 游戏,但不包含任何游戏和密钥文件。<br /><br />在开始前,请找到放置于设备存储中的 <![CDATA[<b> prod.keys </b>]]> 文件。<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">了解更多</a>]]></string> - <string name="emulation_notification_channel_name">正在进行模拟</string> - <string name="emulation_notification_channel_description">在模拟运行时显示持久通知。</string> - <string name="emulation_notification_running">yuzu 正在运行</string> <string name="notice_notification_channel_name">通知及错误提醒</string> <string name="notice_notification_channel_description">当发生错误时显示通知。</string> <string name="notification_permission_not_granted">未授予通知权限!</string> diff --git a/src/android/app/src/main/res/values-zh-rTW/strings.xml b/src/android/app/src/main/res/values-zh-rTW/strings.xml index d39255714..411fc5947 100644 --- a/src/android/app/src/main/res/values-zh-rTW/strings.xml +++ b/src/android/app/src/main/res/values-zh-rTW/strings.xml @@ -2,9 +2,6 @@ <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"> <string name="app_disclaimer">此軟體可以執行 Nintendo Switch 主機遊戲,但不包含任何遊戲和金鑰。<br /><br />在您開始前,請找到放置於您的裝置儲存空間的 <![CDATA[<b> prod.keys </b>]]> 檔案。<br /><br /><![CDATA[<a href=\"https://yuzu-emu.org/help/quickstart\">深入瞭解</a>]]></string> - <string name="emulation_notification_channel_name">模擬進行中</string> - <string name="emulation_notification_channel_description">在模擬執行時顯示持續通知。</string> - <string name="emulation_notification_running">yuzu 正在執行</string> <string name="notice_notification_channel_name">通知和錯誤</string> <string name="notice_notification_channel_description">發生錯誤時顯示通知。</string> <string name="notification_permission_not_granted">未授予通知權限!</string> diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 3cd1586fd..489e00107 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -4,10 +4,6 @@ <!-- General application strings --> <string name="app_name" translatable="false">yuzu</string> <string name="app_disclaimer">This software will run games for the Nintendo Switch game console. No game titles or keys are included.<br /><br />Before you begin, please locate your <![CDATA[<b> prod.keys </b>]]> file on your device storage.<br /><br /><![CDATA[<a href="https://yuzu-emu.org/help/quickstart">Learn more</a>]]></string> - <string name="emulation_notification_channel_name">Emulation is Active</string> - <string name="emulation_notification_channel_id" translatable="false">emulationIsActive</string> - <string name="emulation_notification_channel_description">Shows a persistent notification when emulation is running.</string> - <string name="emulation_notification_running">yuzu is running</string> <string name="notice_notification_channel_name">Notices and errors</string> <string name="notice_notification_channel_id" translatable="false">noticesAndErrors</string> <string name="notice_notification_channel_description">Shows notifications when something goes wrong.</string> @@ -380,6 +376,7 @@ <string name="emulation_exit">Exit emulation</string> <string name="emulation_done">Done</string> <string name="emulation_fps_counter">FPS counter</string> + <string name="emulation_thermal_indicator">Thermal indicator</string> <string name="emulation_toggle_controls">Toggle controls</string> <string name="emulation_rel_stick_center">Relative stick center</string> <string name="emulation_dpad_slide">D-pad slide</string> |