Merge pull request #12551 from t895/dpad-save-fix

android: Fix dpad position saving
This commit is contained in:
liamwhite 2024-01-02 10:44:26 -05:00 committed by GitHub
commit cec91c5fd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -30,7 +30,6 @@ import org.yuzu.yuzu_emu.NativeLibrary.StickType
import org.yuzu.yuzu_emu.R import org.yuzu.yuzu_emu.R
import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting
import org.yuzu.yuzu_emu.features.settings.model.IntSetting import org.yuzu.yuzu_emu.features.settings.model.IntSetting
import org.yuzu.yuzu_emu.features.settings.model.Settings
import org.yuzu.yuzu_emu.overlay.model.OverlayControl import org.yuzu.yuzu_emu.overlay.model.OverlayControl
import org.yuzu.yuzu_emu.overlay.model.OverlayControlData import org.yuzu.yuzu_emu.overlay.model.OverlayControlData
import org.yuzu.yuzu_emu.overlay.model.OverlayLayout import org.yuzu.yuzu_emu.overlay.model.OverlayLayout
@ -302,7 +301,7 @@ class InputOverlay(context: Context, attrs: AttributeSet?) :
MotionEvent.ACTION_POINTER_UP -> if (dpadBeingConfigured === dpad) { MotionEvent.ACTION_POINTER_UP -> if (dpadBeingConfigured === dpad) {
// Persist button position by saving new place. // Persist button position by saving new place.
saveControlPosition( saveControlPosition(
Settings.PREF_BUTTON_DPAD, OverlayControl.COMBINED_DPAD.id,
dpadBeingConfigured!!.bounds.centerX(), dpadBeingConfigured!!.bounds.centerX(),
dpadBeingConfigured!!.bounds.centerY(), dpadBeingConfigured!!.bounds.centerY(),
layout layout