summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt14
-rw-r--r--src/core/file_sys/fssystem/fssystem_aes_xts_storage.h1
2 files changed, 8 insertions, 7 deletions
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 100644
--- 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) {
diff --git a/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h b/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h
index f342efb57..0e83ca1b9 100644
--- a/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h
+++ b/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h
@@ -3,6 +3,7 @@
3 3
4#pragma once 4#pragma once
5 5
6#include <mutex>
6#include <optional> 7#include <optional>
7 8
8#include "core/crypto/aes_util.h" 9#include "core/crypto/aes_util.h"