summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Charles Lombardo2023-05-31 02:59:11 -0400
committerGravatar bunnei2023-06-03 00:06:05 -0700
commitad9c2356a88418ee14453a79b92a814ebe10a857 (patch)
tree43d32ce44ebb011d13e689a4eb58b1024157c450 /src
parentandroid: Prevent deleting the settings file while a game is running (diff)
downloadyuzu-ad9c2356a88418ee14453a79b92a814ebe10a857.tar.gz
yuzu-ad9c2356a88418ee14453a79b92a814ebe10a857.tar.xz
yuzu-ad9c2356a88418ee14453a79b92a814ebe10a857.zip
android: Fix FPS text getting cut off by rounded display corners
Diffstat (limited to 'src')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt23
-rw-r--r--src/android/app/src/main/res/layout/fragment_emulation.xml4
2 files changed, 20 insertions, 7 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 ce3f2639a..ea44733c1 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
@@ -354,12 +354,23 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
354 354
355 v.setPadding(left, cutInsets.top, right, 0) 355 v.setPadding(left, cutInsets.top, right, 0)
356 356
357 binding.showFpsText.setPadding( 357 // Ensure FPS text doesn't get cut off by rounded display corners
358 cutInsets.left, 358 val sidePadding = resources.getDimensionPixelSize(R.dimen.spacing_xtralarge)
359 cutInsets.top, 359 if (cutInsets.left == 0) {
360 cutInsets.right, 360 binding.showFpsText.setPadding(
361 cutInsets.bottom 361 sidePadding,
362 ) 362 cutInsets.top,
363 cutInsets.right,
364 cutInsets.bottom
365 )
366 } else {
367 binding.showFpsText.setPadding(
368 cutInsets.left,
369 cutInsets.top,
370 cutInsets.right,
371 cutInsets.bottom
372 )
373 }
363 windowInsets 374 windowInsets
364 } 375 }
365 } 376 }
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 648b5aaed..74ec512af 100644
--- a/src/android/app/src/main/res/layout/fragment_emulation.xml
+++ b/src/android/app/src/main/res/layout/fragment_emulation.xml
@@ -32,11 +32,13 @@
32 android:id="@+id/show_fps_text" 32 android:id="@+id/show_fps_text"
33 android:layout_width="wrap_content" 33 android:layout_width="wrap_content"
34 android:layout_height="wrap_content" 34 android:layout_height="wrap_content"
35 android:layout_gravity="left"
35 android:clickable="false" 36 android:clickable="false"
36 android:focusable="false" 37 android:focusable="false"
37 android:shadowColor="@android:color/black" 38 android:shadowColor="@android:color/black"
38 android:textColor="@android:color/white" 39 android:textColor="@android:color/white"
39 android:textSize="12sp" /> 40 android:textSize="12sp"
41 tools:ignore="RtlHardcoded" />
40 42
41 <Button 43 <Button
42 style="@style/Widget.Material3.Button.ElevatedButton" 44 style="@style/Widget.Material3.Button.ElevatedButton"