Browse Source

fix: ensure controller overlay draws in front of paused frame

pull/3651/head
xXJSONDeruloXx 6 days ago
parent
commit
8c7dba3be4
No known key found for this signature in database GPG Key ID: 629F3E618E280D7F
  1. 5
      src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt
  2. 24
      src/android/app/src/main/res/layout/fragment_emulation.xml

5
src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt

@ -20,7 +20,6 @@ import android.os.Looper
import android.util.AttributeSet
import android.view.HapticFeedbackConstants
import android.view.MotionEvent
import android.view.SurfaceView
import android.view.View
import android.view.View.OnTouchListener
import android.view.WindowInsets
@ -42,10 +41,10 @@ import org.yuzu.yuzu_emu.utils.NativeConfig
/**
* Draws the interactive input overlay on top of the
* [SurfaceView] that is rendering emulation.
* emulation rendering surface.
*/
class InputOverlay(context: Context, attrs: AttributeSet?) :
SurfaceView(context, attrs),
View(context, attrs),
OnTouchListener {
private val overlayButtons: MutableSet<InputOverlayDrawableButton> = HashSet()
private val overlayDpads: MutableSet<InputOverlayDrawableDpad> = HashSet()

24
src/android/app/src/main/res/layout/fragment_emulation.xml

@ -108,6 +108,22 @@
</FrameLayout>
<FrameLayout
android:id="@+id/paused_frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="false">
<ImageView
android:id="@+id/paused_frame_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@null"
android:scaleType="fitCenter"
android:visibility="gone" />
</FrameLayout>
<FrameLayout
android:id="@+id/input_container"
android:layout_width="match_parent"
@ -142,14 +158,6 @@
android:layout_height="match_parent"
android:fitsSystemWindows="false">
<ImageView
android:id="@+id/paused_frame_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@null"
android:scaleType="fitCenter"
android:visibility="gone" />
<ImageView
android:id="@+id/paused_icon"
android:layout_width="64dp"

Loading…
Cancel
Save