diff options
author | pineappleEA <pineaea@gmail.com> | 2024-02-21 15:11:25 +0100 |
---|---|---|
committer | pineappleEA <pineaea@gmail.com> | 2024-02-21 15:11:25 +0100 |
commit | d3f62ba875c1def30362ad9d4c6312e38c30711a (patch) | |
tree | 07fb32ba015e835bd85f17f8e8ff7796645b2b0a | |
parent | 4565d8fcd8bf8cb1f11ddde057afe510f63f7a89 (diff) |
early-access version 4157EA-4157
-rwxr-xr-x | README.md | 2 | ||||
-rwxr-xr-x | src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt | 14 |
2 files changed, 8 insertions, 8 deletions
@@ -1,7 +1,7 @@ | |||
1 | yuzu emulator early access | 1 | yuzu emulator early access |
2 | ============= | 2 | ============= |
3 | 3 | ||
4 | This is the source code for early-access 4156. | 4 | This is the source code for early-access 4157. |
5 | 5 | ||
6 | ## Legal Notice | 6 | ## Legal Notice |
7 | 7 | ||
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( | |||
780 | playerIndex: Int, | 780 | playerIndex: Int, |
781 | paramName: String, | 781 | paramName: String, |
782 | stick: NativeAnalog, | 782 | stick: NativeAnalog, |
783 | defaultValue: Int | 783 | defaultValue: Float |
784 | ): AbstractIntSetting = | 784 | ): AbstractIntSetting = |
785 | object : AbstractIntSetting { | 785 | object : AbstractIntSetting { |
786 | val params get() = NativeInput.getStickParam(playerIndex, stick) | 786 | val params get() = NativeInput.getStickParam(playerIndex, stick) |
@@ -788,7 +788,7 @@ class SettingsFragmentPresenter( | |||
788 | override val key = "" | 788 | override val key = "" |
789 | 789 | ||
790 | override fun getInt(needsGlobal: Boolean): Int = | 790 | override fun getInt(needsGlobal: Boolean): Int = |
791 | (params.get(paramName, 0.15f) * 100).toInt() | 791 | (params.get(paramName, defaultValue) * 100).toInt() |
792 | 792 | ||
793 | override fun setInt(value: Int) { | 793 | override fun setInt(value: Int) { |
794 | val tempParams = params | 794 | val tempParams = params |
@@ -796,12 +796,12 @@ class SettingsFragmentPresenter( | |||
796 | NativeInput.setStickParam(playerIndex, stick, tempParams) | 796 | NativeInput.setStickParam(playerIndex, stick, tempParams) |
797 | } | 797 | } |
798 | 798 | ||
799 | override val defaultValue = defaultValue | 799 | override val defaultValue = (defaultValue * 100).toInt() |
800 | 800 | ||
801 | override fun getValueAsString(needsGlobal: Boolean): String = | 801 | override fun getValueAsString(needsGlobal: Boolean): String = |
802 | getInt(needsGlobal).toString() | 802 | getInt(needsGlobal).toString() |
803 | 803 | ||
804 | override fun reset() = setInt(defaultValue) | 804 | override fun reset() = setInt(this.defaultValue) |
805 | } | 805 | } |
806 | 806 | ||
807 | private fun getExtraStickSettings( | 807 | private fun getExtraStickSettings( |
@@ -811,11 +811,11 @@ class SettingsFragmentPresenter( | |||
811 | val stickIsController = | 811 | val stickIsController = |
812 | NativeInput.isController(NativeInput.getStickParam(playerIndex, nativeAnalog)) | 812 | NativeInput.isController(NativeInput.getStickParam(playerIndex, nativeAnalog)) |
813 | val modifierRangeSetting = | 813 | val modifierRangeSetting = |
814 | getStickIntSettingFromParam(playerIndex, "modifier_scale", nativeAnalog, 50) | 814 | getStickIntSettingFromParam(playerIndex, "modifier_scale", nativeAnalog, 0.5f) |
815 | val stickRangeSetting = | 815 | val stickRangeSetting = |
816 | getStickIntSettingFromParam(playerIndex, "range", nativeAnalog, 95) | 816 | getStickIntSettingFromParam(playerIndex, "range", nativeAnalog, 0.95f) |
817 | val stickDeadzoneSetting = | 817 | val stickDeadzoneSetting = |
818 | getStickIntSettingFromParam(playerIndex, "deadzone", nativeAnalog, 15) | 818 | getStickIntSettingFromParam(playerIndex, "deadzone", nativeAnalog, 0.15f) |
819 | 819 | ||
820 | val out = mutableListOf<SettingsItem>().apply { | 820 | val out = mutableListOf<SettingsItem>().apply { |
821 | if (stickIsController) { | 821 | if (stickIsController) { |