From 1fb2013090b5146c02b4610b745400fcc0d89ef2 Mon Sep 17 00:00:00 2001 From: adas20 Date: Mon, 28 Jul 2025 13:43:33 -0400 Subject: [PATCH] Displayed combo button in both landscape and portrait --- .../citra/citra_emu/overlay/InputOverlay.kt | 28 +++++++++++++++++++ .../app/src/main/res/values/integers.xml | 8 +++--- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/src/android/app/src/main/java/org/citra/citra_emu/overlay/InputOverlay.kt b/src/android/app/src/main/java/org/citra/citra_emu/overlay/InputOverlay.kt index 23dcddc78..42d79380a 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/overlay/InputOverlay.kt +++ b/src/android/app/src/main/java/org/citra/citra_emu/overlay/InputOverlay.kt @@ -542,6 +542,18 @@ class InputOverlay(context: Context?, attrs: AttributeSet?) : SurfaceView(contex ) ) } + + if (preferences.getBoolean("buttonToggle16", true)) { + overlayButtons.add( + initializeOverlayButton( + context, + R.drawable.button_combo, + R.drawable.button_combo_pressed, + NativeLibrary.ButtonType.BUTTON_COMBO, + orientation + ) + ) + } } fun refreshControls() { @@ -755,6 +767,14 @@ class InputOverlay(context: Context?, attrs: AttributeSet?) : SurfaceView(contex NativeLibrary.ButtonType.BUTTON_TURBO.toString() + "-Y", resources.getInteger(R.integer.N3DS_BUTTON_TURBO_Y).toFloat() / 1000 * maxY ) + .putFloat( + NativeLibrary.ButtonType.BUTTON_COMBO.toString() + "-X", + resources.getInteger(R.integer.N3DS_BUTTON_COMBO_X).toFloat() / 1000 * maxX + ) + .putFloat( + NativeLibrary.ButtonType.BUTTON_COMBO.toString() + "-Y", + resources.getInteger(R.integer.N3DS_BUTTON_COMBO_Y).toFloat() / 1000 * maxY + ) .apply() } @@ -906,6 +926,14 @@ class InputOverlay(context: Context?, attrs: AttributeSet?) : SurfaceView(contex NativeLibrary.ButtonType.BUTTON_TURBO.toString() + portrait + "-Y", resources.getInteger(R.integer.N3DS_BUTTON_TURBO_PORTRAIT_Y).toFloat() / 1000 * maxY ) + .putFloat( + NativeLibrary.ButtonType.BUTTON_COMBO.toString() + portrait + "-X", + resources.getInteger(R.integer.N3DS_BUTTON_COMBO_X).toFloat() / 1000 * maxX + ) + .putFloat( + NativeLibrary.ButtonType.BUTTON_COMBO.toString() + portrait + "-Y", + resources.getInteger(R.integer.N3DS_BUTTON_COMBO_Y).toFloat() / 1000 * maxY + ) .apply() } diff --git a/src/android/app/src/main/res/values/integers.xml b/src/android/app/src/main/res/values/integers.xml index 4956243af..133b4d16f 100644 --- a/src/android/app/src/main/res/values/integers.xml +++ b/src/android/app/src/main/res/values/integers.xml @@ -35,8 +35,8 @@ 850 630 850 - 900 - 900 + 750 + 800 810 @@ -71,7 +71,7 @@ 675 453 720 - 900 - 1600 + 460 + 550