From d3f62ba875c1def30362ad9d4c6312e38c30711a Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Wed, 21 Feb 2024 15:11:25 +0100 Subject: [PATCH] early-access version 4157 --- README.md | 2 +- .../settings/ui/SettingsFragmentPresenter.kt | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c733bba80..a6d217a0f 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 4156. +This is the source code for early-access 4157. ## Legal Notice diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt index 6907bec02..3ea5f5008 100755 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt @@ -780,7 +780,7 @@ class SettingsFragmentPresenter( playerIndex: Int, paramName: String, stick: NativeAnalog, - defaultValue: Int + defaultValue: Float ): AbstractIntSetting = object : AbstractIntSetting { val params get() = NativeInput.getStickParam(playerIndex, stick) @@ -788,7 +788,7 @@ class SettingsFragmentPresenter( override val key = "" override fun getInt(needsGlobal: Boolean): Int = - (params.get(paramName, 0.15f) * 100).toInt() + (params.get(paramName, defaultValue) * 100).toInt() override fun setInt(value: Int) { val tempParams = params @@ -796,12 +796,12 @@ class SettingsFragmentPresenter( NativeInput.setStickParam(playerIndex, stick, tempParams) } - override val defaultValue = defaultValue + override val defaultValue = (defaultValue * 100).toInt() override fun getValueAsString(needsGlobal: Boolean): String = getInt(needsGlobal).toString() - override fun reset() = setInt(defaultValue) + override fun reset() = setInt(this.defaultValue) } private fun getExtraStickSettings( @@ -811,11 +811,11 @@ class SettingsFragmentPresenter( val stickIsController = NativeInput.isController(NativeInput.getStickParam(playerIndex, nativeAnalog)) val modifierRangeSetting = - getStickIntSettingFromParam(playerIndex, "modifier_scale", nativeAnalog, 50) + getStickIntSettingFromParam(playerIndex, "modifier_scale", nativeAnalog, 0.5f) val stickRangeSetting = - getStickIntSettingFromParam(playerIndex, "range", nativeAnalog, 95) + getStickIntSettingFromParam(playerIndex, "range", nativeAnalog, 0.95f) val stickDeadzoneSetting = - getStickIntSettingFromParam(playerIndex, "deadzone", nativeAnalog, 15) + getStickIntSettingFromParam(playerIndex, "deadzone", nativeAnalog, 0.15f) val out = mutableListOf().apply { if (stickIsController) {