VERY experimental Nintendo Switch 2 emulator
C++
android: Simplify FPS counter padding
Charles Lombardofaa2a17ad172
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.ktindex 3781d1d35c..c32fa0d7e7 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@@ -462,7 +462,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {if (it.orientation == FoldingFeature.Orientation.HORIZONTAL) {// Restrict emulation and overlays to the top of the screenbinding.emulationContainer.layoutParams.height = it.bounds.top- binding.overlayContainer.layoutParams.height = it.bounds.top// Restrict input and menu drawer to the bottom of the screenbinding.inputContainer.layoutParams.height = it.bounds.bottombinding.inGameMenu.layoutParams.height = it.bounds.bottom@@ -476,7 +475,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {if (!isFolding) {binding.emulationContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENTbinding.inputContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT- binding.overlayContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENTbinding.inGameMenu.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENTisInFoldableLayout = falseupdateOrientation()@@ -484,7 +482,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {}binding.emulationContainer.requestLayout()binding.inputContainer.requestLayout()- binding.overlayContainer.requestLayout()binding.inGameMenu.requestLayout()}@@ -710,24 +707,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {}v.setPadding(left, cutInsets.top, right, 0)-- // Ensure FPS text doesn't get cut off by rounded display corners- val sidePadding = resources.getDimensionPixelSize(R.dimen.spacing_xtralarge)- if (cutInsets.left == 0) {- binding.showFpsText.setPadding(- sidePadding,- cutInsets.top,- cutInsets.right,- cutInsets.bottom- )- } else {- binding.showFpsText.setPadding(- cutInsets.left,- cutInsets.top,- cutInsets.right,- cutInsets.bottom- )- }windowInsets}}diff --git a/src/android/app/src/main/res/layout/fragment_emulation.xml b/src/android/app/src/main/res/layout/fragment_emulation.xmlindex 750ce094af..cd6360b45f 100644--- a/src/android/app/src/main/res/layout/fragment_emulation.xml+++ b/src/android/app/src/main/res/layout/fragment_emulation.xml@@ -134,16 +134,18 @@<FrameLayoutandroid:id="@+id/overlay_container"android:layout_width="match_parent"- android:layout_height="match_parent">+ android:layout_height="match_parent"+ android:fitsSystemWindows="true">- <TextView+ <com.google.android.material.textview.MaterialTextViewandroid:id="@+id/show_fps_text"+ style="@style/TextAppearance.Material3.BodyMedium"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_gravity="left"android:clickable="false"android:focusable="false"- android:shadowColor="@android:color/black"+ android:paddingHorizontal="20dp"android:textColor="@android:color/white"android:textSize="12sp"tools:ignore="RtlHardcoded" />