forked from etc/pineapple-src
early-access version 4157
This commit is contained in:
parent
4565d8fcd8
commit
d3f62ba875
2 changed files with 8 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 4156.
|
This is the source code for early-access 4157.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -780,7 +780,7 @@ class SettingsFragmentPresenter(
|
||||||
playerIndex: Int,
|
playerIndex: Int,
|
||||||
paramName: String,
|
paramName: String,
|
||||||
stick: NativeAnalog,
|
stick: NativeAnalog,
|
||||||
defaultValue: Int
|
defaultValue: Float
|
||||||
): AbstractIntSetting =
|
): AbstractIntSetting =
|
||||||
object : AbstractIntSetting {
|
object : AbstractIntSetting {
|
||||||
val params get() = NativeInput.getStickParam(playerIndex, stick)
|
val params get() = NativeInput.getStickParam(playerIndex, stick)
|
||||||
|
@ -788,7 +788,7 @@ class SettingsFragmentPresenter(
|
||||||
override val key = ""
|
override val key = ""
|
||||||
|
|
||||||
override fun getInt(needsGlobal: Boolean): Int =
|
override fun getInt(needsGlobal: Boolean): Int =
|
||||||
(params.get(paramName, 0.15f) * 100).toInt()
|
(params.get(paramName, defaultValue) * 100).toInt()
|
||||||
|
|
||||||
override fun setInt(value: Int) {
|
override fun setInt(value: Int) {
|
||||||
val tempParams = params
|
val tempParams = params
|
||||||
|
@ -796,12 +796,12 @@ class SettingsFragmentPresenter(
|
||||||
NativeInput.setStickParam(playerIndex, stick, tempParams)
|
NativeInput.setStickParam(playerIndex, stick, tempParams)
|
||||||
}
|
}
|
||||||
|
|
||||||
override val defaultValue = defaultValue
|
override val defaultValue = (defaultValue * 100).toInt()
|
||||||
|
|
||||||
override fun getValueAsString(needsGlobal: Boolean): String =
|
override fun getValueAsString(needsGlobal: Boolean): String =
|
||||||
getInt(needsGlobal).toString()
|
getInt(needsGlobal).toString()
|
||||||
|
|
||||||
override fun reset() = setInt(defaultValue)
|
override fun reset() = setInt(this.defaultValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getExtraStickSettings(
|
private fun getExtraStickSettings(
|
||||||
|
@ -811,11 +811,11 @@ class SettingsFragmentPresenter(
|
||||||
val stickIsController =
|
val stickIsController =
|
||||||
NativeInput.isController(NativeInput.getStickParam(playerIndex, nativeAnalog))
|
NativeInput.isController(NativeInput.getStickParam(playerIndex, nativeAnalog))
|
||||||
val modifierRangeSetting =
|
val modifierRangeSetting =
|
||||||
getStickIntSettingFromParam(playerIndex, "modifier_scale", nativeAnalog, 50)
|
getStickIntSettingFromParam(playerIndex, "modifier_scale", nativeAnalog, 0.5f)
|
||||||
val stickRangeSetting =
|
val stickRangeSetting =
|
||||||
getStickIntSettingFromParam(playerIndex, "range", nativeAnalog, 95)
|
getStickIntSettingFromParam(playerIndex, "range", nativeAnalog, 0.95f)
|
||||||
val stickDeadzoneSetting =
|
val stickDeadzoneSetting =
|
||||||
getStickIntSettingFromParam(playerIndex, "deadzone", nativeAnalog, 15)
|
getStickIntSettingFromParam(playerIndex, "deadzone", nativeAnalog, 0.15f)
|
||||||
|
|
||||||
val out = mutableListOf<SettingsItem>().apply {
|
val out = mutableListOf<SettingsItem>().apply {
|
||||||
if (stickIsController) {
|
if (stickIsController) {
|
||||||
|
|
Loading…
Reference in a new issue