diff --git a/externals/renderdoc/renderdoc_app.h b/externals/renderdoc/renderdoc_app.h index c379f0ac40..e6c1511deb 100644 --- a/externals/renderdoc/renderdoc_app.h +++ b/externals/renderdoc/renderdoc_app.h @@ -7,7 +7,7 @@ /****************************************************************************** * The MIT License (MIT) * - * Copyright (c) 2015-2026 Baldur Karlsson + * Copyright (c) 2019-2025 Baldur Karlsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -72,10 +72,6 @@ extern "C" { // truncated version when only a uint64_t is available (e.g. Vulkan tags): #define RENDERDOC_ShaderDebugMagicValue_truncated 0x48656670eab25520ULL -// this is a magic value for vulkan user tags to indicate which dispatchable API objects are which -// for object annotations -#define RENDERDOC_APIObjectAnnotationHelper 0xfbb3b337b664d0adULL - ////////////////////////////////////////////////////////////////////////////////////////////////// // RenderDoc capture options // @@ -568,128 +564,6 @@ typedef uint32_t(RENDERDOC_CC *pRENDERDOC_DiscardFrameCapture)(RENDERDOC_DeviceP // multiple times only the last title will be used. typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureTitle)(const char *title); -// Annotations API: -// -// These functions allow you to specify annotations either on a per-command level, or a per-object -// level. -// -// Basic types of annotations are supported, as well as vector versions and references to API objects. -// -// The annotations are stored as keys, with the key being a dot-separated path allowing arbitrary -// nesting and user organisation. The keys are sorted in human order so `foo.2.bar` will be displayed -// before `foo.10.bar` to allow creation of arrays if desired. -// -// Deleting an annotation can be done by assigning an empty value to it. - -// the type of an annotation value, or Empty to delete an annotation -typedef enum RENDERDOC_AnnotationType -{ - eRENDERDOC_Empty, - eRENDERDOC_Bool, - eRENDERDOC_Int32, - eRENDERDOC_UInt32, - eRENDERDOC_Int64, - eRENDERDOC_UInt64, - eRENDERDOC_Float, - eRENDERDOC_Double, - eRENDERDOC_String, - eRENDERDOC_APIObject, - eRENDERDOC_AnnotationMax = 0x7FFFFFFF, -} RENDERDOC_AnnotationType; - -// a union with vector annotation value data -typedef union RENDERDOC_AnnotationVectorValue -{ - bool boolean[4]; - int32_t int32[4]; - int64_t int64[4]; - uint32_t uint32[4]; - uint64_t uint64[4]; - float float32[4]; - double float64[4]; -} RENDERDOC_AnnotationVectorValue; - -// a union with scalar annotation value data -typedef union RENDERDOC_AnnotationValue -{ - bool boolean; - int32_t int32; - int64_t int64; - uint32_t uint32; - uint64_t uint64; - float float32; - double float64; - - RENDERDOC_AnnotationVectorValue vector; - - const char *string; - void *apiObject; -} RENDERDOC_AnnotationValue; - -// a struct for specifying a GL object, as we don't have pointers we can use so instead we specify a -// pointer to this struct giving both the type and the name -typedef struct RENDERDOC_GLResourceReference -{ - // this is the same GLenum identifier as passed to glObjectLabel - uint32_t identifier; - uint32_t name; -} GLResourceReference; - -// simple C++ helpers to avoid the need for a temporary objects for value passing and GL object specification -#ifdef __cplusplus -struct RDGLObjectHelper -{ - RENDERDOC_GLResourceReference gl; - - RDGLObjectHelper(uint32_t identifier, uint32_t name) - { - gl.identifier = identifier; - gl.name = name; - } - - operator RENDERDOC_GLResourceReference *() { return ≷ } -}; - -struct RDAnnotationHelper -{ - RENDERDOC_AnnotationValue val; - - RDAnnotationHelper(bool b) { val.boolean = b; } - RDAnnotationHelper(int32_t i) { val.int32 = i; } - RDAnnotationHelper(int64_t i) { val.int64 = i; } - RDAnnotationHelper(uint32_t i) { val.uint32 = i; } - RDAnnotationHelper(uint64_t i) { val.uint64 = i; } - RDAnnotationHelper(float f) { val.float32 = f; } - RDAnnotationHelper(double d) { val.float64 = d; } - RDAnnotationHelper(const char *s) { val.string = s; } - - operator RENDERDOC_AnnotationValue *() { return &val; } -}; -#endif - -// The device is specified in the same way as other API calls that take a RENDERDOC_DevicePointer -// to specify the device. -// -// The object or queue/commandbuffer will depend on the graphics API in question. -// -// Return value: -// 0 - The annotation was applied successfully. -// 1 - The device is unknown/invalid -// 2 - The device is valid but the annotation is not supported for API-specific reasons, such as an -// unrecognised or invalid object or queue/commandbuffer -// 3 - The call is ill-formed or invalid e.g. empty is specified with a value pointer, or non-empty -// is specified with a NULL value pointer -typedef uint32_t(RENDERDOC_CC *pRENDERDOC_SetObjectAnnotation)(RENDERDOC_DevicePointer device, - void *object, const char *key, - RENDERDOC_AnnotationType valueType, - uint32_t valueVectorWidth, - const RENDERDOC_AnnotationValue *value); - -typedef uint32_t(RENDERDOC_CC *pRENDERDOC_SetCommandAnnotation)( - RENDERDOC_DevicePointer device, void *queueOrCommandBuffer, const char *key, - RENDERDOC_AnnotationType valueType, uint32_t valueVectorWidth, - const RENDERDOC_AnnotationValue *value); - ////////////////////////////////////////////////////////////////////////////////////////////////// // RenderDoc API versions // @@ -718,7 +592,6 @@ typedef enum RENDERDOC_Version eRENDERDOC_API_Version_1_4_2 = 10402, // RENDERDOC_API_1_4_2 = 1 04 02 eRENDERDOC_API_Version_1_5_0 = 10500, // RENDERDOC_API_1_5_0 = 1 05 00 eRENDERDOC_API_Version_1_6_0 = 10600, // RENDERDOC_API_1_6_0 = 1 06 00 - eRENDERDOC_API_Version_1_7_0 = 10700, // RENDERDOC_API_1_7_0 = 1 07 00 } RENDERDOC_Version; // API version changelog: @@ -749,10 +622,8 @@ typedef enum RENDERDOC_Version // 1.5.0 - Added feature: ShowReplayUI() to request that the replay UI show itself if connected // 1.6.0 - Added feature: SetCaptureTitle() which can be used to set a title for a // capture made with StartFrameCapture() or EndFrameCapture() -// 1.7.0 - Added feature: SetObjectAnnotation() / SetCommandAnnotation() for adding rich -// annotations to objects and command streams -typedef struct RENDERDOC_API_1_7_0 +typedef struct RENDERDOC_API_1_6_0 { pRENDERDOC_GetAPIVersion GetAPIVersion; @@ -830,25 +701,20 @@ typedef struct RENDERDOC_API_1_7_0 // new function in 1.6.0 pRENDERDOC_SetCaptureTitle SetCaptureTitle; +} RENDERDOC_API_1_6_0; - // new functions in 1.7.0 - pRENDERDOC_SetObjectAnnotation SetObjectAnnotation; - pRENDERDOC_SetCommandAnnotation SetCommandAnnotation; -} RENDERDOC_API_1_7_0; - -typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_0_0; -typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_0_1; -typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_0_2; -typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_1_0; -typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_1_1; -typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_1_2; -typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_2_0; -typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_3_0; -typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_4_0; -typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_4_1; -typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_4_2; -typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_5_0; -typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_6_0; +typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_0_0; +typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_0_1; +typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_0_2; +typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_1_0; +typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_1_1; +typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_1_2; +typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_2_0; +typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_3_0; +typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_4_0; +typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_4_1; +typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_4_2; +typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_5_0; ////////////////////////////////////////////////////////////////////////////////////////////////// // RenderDoc API entry point diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/dialogs/ChatDialog.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/dialogs/ChatDialog.kt index 431125ca8e..5d6679bd28 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/dialogs/ChatDialog.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/dialogs/ChatDialog.kt @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later package org.yuzu.yuzu_emu.dialogs @@ -20,8 +20,6 @@ import org.yuzu.yuzu_emu.databinding.DialogChatBinding import org.yuzu.yuzu_emu.databinding.ItemChatMessageBinding import org.yuzu.yuzu_emu.features.settings.model.StringSetting import org.yuzu.yuzu_emu.network.NetPlayManager -import org.yuzu.yuzu_emu.utils.CompatUtils -import org.yuzu.yuzu_emu.utils.FullscreenHelper import java.text.SimpleDateFormat import java.util.* @@ -36,13 +34,6 @@ class ChatDialog(context: Context) : BottomSheetDialog(context) { private lateinit var binding: DialogChatBinding private lateinit var chatAdapter: ChatAdapter private val handler = Handler(Looper.getMainLooper()) - private val hideSystemBars: Boolean by lazy { - runCatching { - FullscreenHelper.shouldHideSystemBars(CompatUtils.findActivity(context)) - }.getOrElse { - FullscreenHelper.isFullscreenEnabled(context) - } - } // TODO(alekpop, crueter): Top drawer for message notifications, perhaps use system notifs? // TODO(alekpop, crueter): Context menu actions for chat users @@ -50,7 +41,6 @@ class ChatDialog(context: Context) : BottomSheetDialog(context) { @SuppressLint("NotifyDataSetChanged") override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - setOnShowListener { applyFullscreenMode() } binding = DialogChatBinding.inflate(LayoutInflater.from(context)) setContentView(binding.root) @@ -85,11 +75,6 @@ class ChatDialog(context: Context) : BottomSheetDialog(context) { } } - override fun onStart() { - super.onStart() - applyFullscreenMode() - } - override fun dismiss() { NetPlayManager.setChatOpen(false) super.dismiss() @@ -123,12 +108,6 @@ class ChatDialog(context: Context) : BottomSheetDialog(context) { private fun scrollToBottom() { binding.chatRecyclerView.scrollToPosition(chatAdapter.itemCount - 1) } - - private fun applyFullscreenMode() { - window?.let { window -> - FullscreenHelper.applyToWindow(window, hideSystemBars) - } - } } class ChatAdapter(private val messages: List) : diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/dialogs/LobbyBrowser.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/dialogs/LobbyBrowser.kt index 10ff2da6c7..6d5c6ef23f 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/dialogs/LobbyBrowser.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/dialogs/LobbyBrowser.kt @@ -31,25 +31,15 @@ import org.yuzu.yuzu_emu.databinding.DialogLobbyBrowserBinding import org.yuzu.yuzu_emu.databinding.ItemLobbyRoomBinding import org.yuzu.yuzu_emu.features.settings.model.StringSetting import org.yuzu.yuzu_emu.network.NetPlayManager -import org.yuzu.yuzu_emu.utils.CompatUtils -import org.yuzu.yuzu_emu.utils.FullscreenHelper import java.util.Locale class LobbyBrowser(context: Context) : BottomSheetDialog(context) { private lateinit var binding: DialogLobbyBrowserBinding private lateinit var adapter: LobbyRoomAdapter private val handler = Handler(Looper.getMainLooper()) - private val hideSystemBars: Boolean by lazy { - runCatching { - FullscreenHelper.shouldHideSystemBars(CompatUtils.findActivity(context)) - }.getOrElse { - FullscreenHelper.isFullscreenEnabled(context) - } - } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - setOnShowListener { applyFullscreenMode() } behavior.state = BottomSheetBehavior.STATE_EXPANDED behavior.skipCollapsed = @@ -91,7 +81,6 @@ class LobbyBrowser(context: Context) : BottomSheetDialog(context) { behavior.expandedOffset = 0 behavior.skipCollapsed = true behavior.state = BottomSheetBehavior.STATE_EXPANDED - applyFullscreenMode() } private fun setupRecyclerView() { @@ -285,10 +274,4 @@ class LobbyBrowser(context: Context) : BottomSheetDialog(context) { } private inner class ScoreItem(val score: Double, val item: NetPlayManager.RoomInfo) - - private fun applyFullscreenMode() { - window?.let { window -> - FullscreenHelper.applyToWindow(window, hideSystemBars) - } - } } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/dialogs/NetPlayDialog.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/dialogs/NetPlayDialog.kt index 45ce5fb0cf..73452b4b69 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/dialogs/NetPlayDialog.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/dialogs/NetPlayDialog.kt @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later package org.yuzu.yuzu_emu.dialogs @@ -36,7 +36,6 @@ import org.yuzu.yuzu_emu.features.settings.model.StringSetting import org.yuzu.yuzu_emu.network.NetDataValidators import org.yuzu.yuzu_emu.network.NetPlayManager import org.yuzu.yuzu_emu.utils.CompatUtils -import org.yuzu.yuzu_emu.utils.FullscreenHelper import org.yuzu.yuzu_emu.utils.GameHelper class NetPlayDialog(context: Context) : BottomSheetDialog(context) { @@ -44,17 +43,9 @@ class NetPlayDialog(context: Context) : BottomSheetDialog(context) { private val gameNameList: MutableList> = mutableListOf() private val gameIdList: MutableList> = mutableListOf() - private val hideSystemBars: Boolean by lazy { - runCatching { - FullscreenHelper.shouldHideSystemBars(CompatUtils.findActivity(context)) - }.getOrElse { - FullscreenHelper.isFullscreenEnabled(context) - } - } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - setOnShowListener { applyFullscreenMode() } behavior.state = BottomSheetBehavior.STATE_EXPANDED behavior.state = BottomSheetBehavior.STATE_EXPANDED @@ -127,11 +118,6 @@ class NetPlayDialog(context: Context) : BottomSheetDialog(context) { } } - override fun onStart() { - super.onStart() - applyFullscreenMode() - } - data class NetPlayItems( val option: Int, val name: String, @@ -366,11 +352,6 @@ class NetPlayDialog(context: Context) : BottomSheetDialog(context) { TextValidatorWatcher.validStates.clear() val activity = CompatUtils.findActivity(context) val dialog = BottomSheetDialog(activity) - dialog.setOnShowListener { - dialog.window?.let { window -> - FullscreenHelper.applyToWindow(window, hideSystemBars) - } - } dialog.behavior.state = BottomSheetBehavior.STATE_EXPANDED dialog.behavior.state = BottomSheetBehavior.STATE_EXPANDED @@ -601,12 +582,6 @@ class NetPlayDialog(context: Context) : BottomSheetDialog(context) { dialog.show() } - private fun applyFullscreenMode() { - window?.let { window -> - FullscreenHelper.applyToWindow(window, hideSystemBars) - } - } - private fun showModerationDialog() { val activity = CompatUtils.findActivity(context) val dialog = MaterialAlertDialogBuilder(activity) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt index b438812d58..0f89533d8e 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt @@ -104,8 +104,6 @@ object Settings { const val PREF_THEME_MODE = "ThemeMode" const val PREF_BLACK_BACKGROUNDS = "BlackBackgrounds" const val PREF_STATIC_THEME_COLOR = "StaticThemeColor" - const val PREF_APP_FULLSCREEN = "AppFullscreen" - const val APP_FULLSCREEN_DEFAULT = false enum class EmulationOrientation(val int: Int) { Unspecified(0), diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt index ad1ecba64c..d33bbc3d7d 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt @@ -103,7 +103,6 @@ class SettingsActivity : AppCompatActivity() { ) setInsets() - applyFullscreenPreference() } fun navigateBack() { @@ -123,18 +122,6 @@ class SettingsActivity : AppCompatActivity() { } } - override fun onResume() { - super.onResume() - applyFullscreenPreference() - } - - override fun onWindowFocusChanged(hasFocus: Boolean) { - super.onWindowFocusChanged(hasFocus) - if (hasFocus) { - applyFullscreenPreference() - } - } - override fun onStop() { super.onStop() Log.info("[SettingsActivity] Settings activity stopping. Saving settings to INI...") @@ -201,8 +188,4 @@ class SettingsActivity : AppCompatActivity() { windowInsets } } - - private fun applyFullscreenPreference() { - FullscreenHelper.applyToActivity(this) - } } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt index 853e1e3e4b..ff25584c92 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt @@ -29,8 +29,6 @@ import org.yuzu.yuzu_emu.features.settings.model.view.* import org.yuzu.yuzu_emu.utils.InputHandler import org.yuzu.yuzu_emu.utils.NativeConfig import org.yuzu.yuzu_emu.utils.DirectoryInitialization -import org.yuzu.yuzu_emu.utils.FullscreenHelper -import androidx.core.content.edit import androidx.fragment.app.FragmentActivity import org.yuzu.yuzu_emu.fragments.MessageDialogFragment @@ -1189,39 +1187,6 @@ class SettingsFragmentPresenter( ) ) - val fullscreenSetting: AbstractBooleanSetting = object : AbstractBooleanSetting { - override fun getBoolean(needsGlobal: Boolean): Boolean = - FullscreenHelper.isFullscreenEnabled(context) - - override fun setBoolean(value: Boolean) { - FullscreenHelper.setFullscreenEnabled(context, value) - settingsViewModel.setShouldRecreate(true) - } - - override val key: String = Settings.PREF_APP_FULLSCREEN - override val isRuntimeModifiable: Boolean = true - override val pairedSettingKey: String = "" - override val isSwitchable: Boolean = false - override var global: Boolean = true - override val isSaveable: Boolean = true - override val defaultValue: Boolean = Settings.APP_FULLSCREEN_DEFAULT - - override fun getValueAsString(needsGlobal: Boolean): String = - getBoolean(needsGlobal).toString() - - override fun reset() { - setBoolean(defaultValue) - } - } - - add( - SwitchSetting( - fullscreenSetting, - titleId = R.string.fullscreen_mode, - descriptionId = R.string.fullscreen_mode_description - ) - ) - add(HeaderSetting(R.string.buttons)) add(BooleanSetting.ENABLE_FOLDER_BUTTON.key) add(BooleanSetting.ENABLE_QLAUNCH_BUTTON.key) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsSubscreenActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsSubscreenActivity.kt index 91888dce12..11ecd355fb 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsSubscreenActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsSubscreenActivity.kt @@ -20,7 +20,6 @@ import org.yuzu.yuzu_emu.R import org.yuzu.yuzu_emu.YuzuApplication import org.yuzu.yuzu_emu.databinding.ActivitySettingsBinding import org.yuzu.yuzu_emu.utils.DirectoryInitialization -import org.yuzu.yuzu_emu.utils.FullscreenHelper import org.yuzu.yuzu_emu.utils.InsetsHelper import org.yuzu.yuzu_emu.utils.ThemeHelper @@ -90,7 +89,6 @@ class SettingsSubscreenActivity : AppCompatActivity() { ) setInsets() - applyFullscreenPreference() } override fun onStart() { @@ -100,18 +98,6 @@ class SettingsSubscreenActivity : AppCompatActivity() { } } - override fun onResume() { - super.onResume() - applyFullscreenPreference() - } - - override fun onWindowFocusChanged(hasFocus: Boolean) { - super.onWindowFocusChanged(hasFocus) - if (hasFocus) { - applyFullscreenPreference() - } - } - fun navigateBack() { val navHostFragment = supportFragmentManager.findFragmentById(R.id.fragment_container) as NavHostFragment @@ -163,8 +149,4 @@ class SettingsSubscreenActivity : AppCompatActivity() { windowInsets } } - - private fun applyFullscreenPreference() { - FullscreenHelper.applyToActivity(this) - } } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/ProfileManagerFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/ProfileManagerFragment.kt index bd37c4c9c7..2786906f6b 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/ProfileManagerFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/ProfileManagerFragment.kt @@ -9,7 +9,6 @@ import android.view.View import android.view.ViewGroup import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat -import androidx.core.view.updatePadding import androidx.fragment.app.Fragment import androidx.fragment.app.activityViewModels import androidx.navigation.fragment.findNavController @@ -23,7 +22,6 @@ import org.yuzu.yuzu_emu.databinding.FragmentProfileManagerBinding import org.yuzu.yuzu_emu.model.HomeViewModel import org.yuzu.yuzu_emu.model.UserProfile import org.yuzu.yuzu_emu.utils.NativeConfig -import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins class ProfileManagerFragment : Fragment() { private var _binding: FragmentProfileManagerBinding? = null @@ -174,19 +172,11 @@ class ProfileManagerFragment : Fragment() { val leftInsets = barInsets.left + cutoutInsets.left val rightInsets = barInsets.right + cutoutInsets.right - binding.toolbarProfiles.updateMargins(left = leftInsets, right = rightInsets) - binding.listProfiles.updateMargins(left = leftInsets, right = rightInsets) - binding.listProfiles.updatePadding( - bottom = barInsets.bottom + - resources.getDimensionPixelSize(R.dimen.spacing_bottom_list_fab) - ) - - val fabSpacing = resources.getDimensionPixelSize(R.dimen.spacing_fab) - binding.buttonAddUser.updateMargins( - left = leftInsets + fabSpacing, - right = rightInsets + fabSpacing, - bottom = barInsets.bottom + fabSpacing - ) + val fabLayoutParams = binding.buttonAddUser.layoutParams as ViewGroup.MarginLayoutParams + fabLayoutParams.leftMargin = leftInsets + 24 + fabLayoutParams.rightMargin = rightInsets + 24 + fabLayoutParams.bottomMargin = barInsets.bottom + 24 + binding.buttonAddUser.layoutParams = fabLayoutParams windowInsets } 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 02368bfc16..3a771edfcb 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 @@ -169,7 +169,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider { checkForUpdates() } setInsets() - applyFullscreenPreference() } private fun checkForUpdates() { @@ -346,14 +345,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider { override fun onResume() { ThemeHelper.setCorrectTheme(this) super.onResume() - applyFullscreenPreference() - } - - override fun onWindowFocusChanged(hasFocus: Boolean) { - super.onWindowFocusChanged(hasFocus) - if (hasFocus) { - applyFullscreenPreference() - } } private fun setInsets() = ViewCompat.setOnApplyWindowInsetsListener( @@ -373,10 +364,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider { windowInsets } - private fun applyFullscreenPreference() { - FullscreenHelper.applyToActivity(this) - } - override fun setTheme(resId: Int) { super.setTheme(resId) themeId = resId diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FullscreenHelper.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FullscreenHelper.kt deleted file mode 100644 index 62c83e1806..0000000000 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FullscreenHelper.kt +++ /dev/null @@ -1,52 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project -// SPDX-License-Identifier: GPL-3.0-or-later - -package org.yuzu.yuzu_emu.utils - -import android.app.Activity -import android.content.Context -import android.view.Window -import androidx.core.content.edit -import androidx.core.view.ViewCompat -import androidx.core.view.WindowInsetsCompat -import androidx.core.view.WindowInsetsControllerCompat -import androidx.preference.PreferenceManager -import org.yuzu.yuzu_emu.features.settings.model.Settings - -object FullscreenHelper { - fun isFullscreenEnabled(context: Context): Boolean { - return PreferenceManager.getDefaultSharedPreferences(context).getBoolean( - Settings.PREF_APP_FULLSCREEN, - Settings.APP_FULLSCREEN_DEFAULT - ) - } - - fun setFullscreenEnabled(context: Context, enabled: Boolean) { - PreferenceManager.getDefaultSharedPreferences(context).edit { - putBoolean(Settings.PREF_APP_FULLSCREEN, enabled) - } - } - - fun shouldHideSystemBars(activity: Activity): Boolean { - val rootInsets = ViewCompat.getRootWindowInsets(activity.window.decorView) - val barsCurrentlyHidden = - rootInsets?.isVisible(WindowInsetsCompat.Type.systemBars())?.not() ?: false - return isFullscreenEnabled(activity) || barsCurrentlyHidden - } - - fun applyToWindow(window: Window, hideSystemBars: Boolean) { - val controller = WindowInsetsControllerCompat(window, window.decorView) - - if (hideSystemBars) { - controller.hide(WindowInsetsCompat.Type.systemBars()) - controller.systemBarsBehavior = - WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE - } else { - controller.show(WindowInsetsCompat.Type.systemBars()) - } - } - - fun applyToActivity(activity: Activity) { - applyToWindow(activity.window, isFullscreenEnabled(activity)) - } -} diff --git a/src/android/app/src/main/res/layout/fragment_profile_manager.xml b/src/android/app/src/main/res/layout/fragment_profile_manager.xml index 67828ca69e..e70a3f3da5 100644 --- a/src/android/app/src/main/res/layout/fragment_profile_manager.xml +++ b/src/android/app/src/main/res/layout/fragment_profile_manager.xml @@ -5,22 +5,21 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?attr/colorSurface"> + android:background="?attr/colorSurface" + android:fitsSystemWindows="true"> + android:fitsSystemWindows="true"> diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 343cc4b21a..e9bd0f1d1c 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -1160,8 +1160,6 @@ Material You App Settings Theme And Color - Fullscreen mode - Hide Android system bars across app screens. Swipe from an edge to reveal them temporarily. Change theme mode diff --git a/src/core/tools/renderdoc.h b/src/core/tools/renderdoc.h index 689b0a383a..0e5e43da5b 100644 --- a/src/core/tools/renderdoc.h +++ b/src/core/tools/renderdoc.h @@ -1,12 +1,9 @@ -// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project -// SPDX-License-Identifier: GPL-3.0-or-later - // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -struct RENDERDOC_API_1_7_0; +struct RENDERDOC_API_1_6_0; namespace Tools { @@ -18,7 +15,7 @@ public: void ToggleCapture(); private: - RENDERDOC_API_1_7_0* rdoc_api{}; + RENDERDOC_API_1_6_0* rdoc_api{}; bool is_capturing{false}; };