summaryrefslogtreecommitdiffstats
path: root/src/android/app
diff options
context:
space:
mode:
authorAbandoned Cart <twistedumbrella@gmail.com>2023-06-13 12:36:48 +0200
committerAbandoned Cart <twistedumbrella@gmail.com>2023-06-14 22:35:57 +0200
commitf34535f3626549a7cb527d6ecd98251195cd7a5e (patch)
treefe9e27ab9eec023d28ce2472b44cf28e761831c1 /src/android/app
parentandroid: Remove PiP reliance on fragment (diff)
downloadyuzu-f34535f3626549a7cb527d6ecd98251195cd7a5e.tar
yuzu-f34535f3626549a7cb527d6ecd98251195cd7a5e.tar.gz
yuzu-f34535f3626549a7cb527d6ecd98251195cd7a5e.tar.bz2
yuzu-f34535f3626549a7cb527d6ecd98251195cd7a5e.tar.lz
yuzu-f34535f3626549a7cb527d6ecd98251195cd7a5e.tar.xz
yuzu-f34535f3626549a7cb527d6ecd98251195cd7a5e.tar.zst
yuzu-f34535f3626549a7cb527d6ecd98251195cd7a5e.zip
Diffstat (limited to 'src/android/app')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt6
-rw-r--r--src/android/app/src/main/res/layout/fragment_emulation.xml24
2 files changed, 13 insertions, 17 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 2f1a16f00..7db89aef0 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
@@ -327,8 +327,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
onConfigurationChanged(resources.configuration)
}
- private val Number.toPx get() = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, this.toFloat(), Resources.getSystem().displayMetrics).toInt()
-
private fun updateFoldableLayout(emulationActivity: EmulationActivity, newLayoutInfo: WindowLayoutInfo) {
val isFolding = (newLayoutInfo.displayFeatures.find { it is FoldingFeature } as? FoldingFeature)?.let {
if (it.isSeparating) {
@@ -336,8 +334,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
if (it.orientation == FoldingFeature.Orientation.HORIZONTAL) {
binding.emulationContainer.layoutParams.height = it.bounds.top
// Prevent touch regions from being displayed in the hinge
- binding.overlayContainer.layoutParams.height = it.bounds.bottom - 48.toPx
- binding.overlayContainer.updatePadding(0, 0, 0, 24.toPx)
+ binding.overlayContainer.layoutParams.height = it.bounds.bottom
binding.inGameMenu.layoutParams.height = it.bounds.bottom
isInFoldableLayout = true
binding.surfaceInputOverlay.setOrientation(InputOverlay.FOLDABLE)
@@ -349,7 +346,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
if (!isFolding) {
binding.emulationContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT
binding.overlayContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT
- binding.overlayContainer.updatePadding(0, 0, 0, 0)
binding.inGameMenu.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT
isInFoldableLayout = false
updateScreenLayout()
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 01f6b9fe4..ffe5f4882 100644
--- a/src/android/app/src/main/res/layout/fragment_emulation.xml
+++ b/src/android/app/src/main/res/layout/fragment_emulation.xml
@@ -26,6 +26,18 @@
android:focusable="false"
android:focusableInTouchMode="false" />
+ <TextView
+ android:id="@+id/show_fps_text"
+ 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:textColor="@android:color/white"
+ android:textSize="12sp"
+ tools:ignore="RtlHardcoded" />
+
</FrameLayout>
<FrameLayout
@@ -43,18 +55,6 @@
android:focusable="true"
android:focusableInTouchMode="true" />
- <TextView
- android:id="@+id/show_fps_text"
- 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:textColor="@android:color/white"
- android:textSize="12sp"
- tools:ignore="RtlHardcoded" />
-
<Button
style="@style/Widget.Material3.Button.ElevatedButton"
android:id="@+id/done_control_config"