summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt21
-rw-r--r--src/android/app/src/main/res/layout/fragment_emulation.xml8
2 files changed, 5 insertions, 24 deletions
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 3781d1d35..c32fa0d7e 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 {
462 if (it.orientation == FoldingFeature.Orientation.HORIZONTAL) { 462 if (it.orientation == FoldingFeature.Orientation.HORIZONTAL) {
463 // Restrict emulation and overlays to the top of the screen 463 // Restrict emulation and overlays to the top of the screen
464 binding.emulationContainer.layoutParams.height = it.bounds.top 464 binding.emulationContainer.layoutParams.height = it.bounds.top
465 binding.overlayContainer.layoutParams.height = it.bounds.top
466 // Restrict input and menu drawer to the bottom of the screen 465 // Restrict input and menu drawer to the bottom of the screen
467 binding.inputContainer.layoutParams.height = it.bounds.bottom 466 binding.inputContainer.layoutParams.height = it.bounds.bottom
468 binding.inGameMenu.layoutParams.height = it.bounds.bottom 467 binding.inGameMenu.layoutParams.height = it.bounds.bottom
@@ -476,7 +475,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
476 if (!isFolding) { 475 if (!isFolding) {
477 binding.emulationContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT 476 binding.emulationContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT
478 binding.inputContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT 477 binding.inputContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT
479 binding.overlayContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT
480 binding.inGameMenu.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT 478 binding.inGameMenu.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT
481 isInFoldableLayout = false 479 isInFoldableLayout = false
482 updateOrientation() 480 updateOrientation()
@@ -484,7 +482,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
484 } 482 }
485 binding.emulationContainer.requestLayout() 483 binding.emulationContainer.requestLayout()
486 binding.inputContainer.requestLayout() 484 binding.inputContainer.requestLayout()
487 binding.overlayContainer.requestLayout()
488 binding.inGameMenu.requestLayout() 485 binding.inGameMenu.requestLayout()
489 } 486 }
490 487
@@ -710,24 +707,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
710 } 707 }
711 708
712 v.setPadding(left, cutInsets.top, right, 0) 709 v.setPadding(left, cutInsets.top, right, 0)
713
714 // Ensure FPS text doesn't get cut off by rounded display corners
715 val sidePadding = resources.getDimensionPixelSize(R.dimen.spacing_xtralarge)
716 if (cutInsets.left == 0) {
717 binding.showFpsText.setPadding(
718 sidePadding,
719 cutInsets.top,
720 cutInsets.right,
721 cutInsets.bottom
722 )
723 } else {
724 binding.showFpsText.setPadding(
725 cutInsets.left,
726 cutInsets.top,
727 cutInsets.right,
728 cutInsets.bottom
729 )
730 }
731 windowInsets 710 windowInsets
732 } 711 }
733 } 712 }
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 750ce094a..cd6360b45 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 @@
134 <FrameLayout 134 <FrameLayout
135 android:id="@+id/overlay_container" 135 android:id="@+id/overlay_container"
136 android:layout_width="match_parent" 136 android:layout_width="match_parent"
137 android:layout_height="match_parent"> 137 android:layout_height="match_parent"
138 android:fitsSystemWindows="true">
138 139
139 <TextView 140 <com.google.android.material.textview.MaterialTextView
140 android:id="@+id/show_fps_text" 141 android:id="@+id/show_fps_text"
142 style="@style/TextAppearance.Material3.BodyMedium"
141 android:layout_width="wrap_content" 143 android:layout_width="wrap_content"
142 android:layout_height="wrap_content" 144 android:layout_height="wrap_content"
143 android:layout_gravity="left" 145 android:layout_gravity="left"
144 android:clickable="false" 146 android:clickable="false"
145 android:focusable="false" 147 android:focusable="false"
146 android:shadowColor="@android:color/black" 148 android:paddingHorizontal="20dp"
147 android:textColor="@android:color/white" 149 android:textColor="@android:color/white"
148 android:textSize="12sp" 150 android:textSize="12sp"
149 tools:ignore="RtlHardcoded" /> 151 tools:ignore="RtlHardcoded" />