mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-06-06 02:33:44 -04:00
Deleted Multi String Setting, added basic error handling, added comment explaining hardcoded size
This commit is contained in:
parent
244a1e1fdf
commit
485778be95
3 changed files with 6 additions and 15 deletions
|
|
@ -1,9 +0,0 @@
|
|||
// Copyright Citra Emulator Project / Azahar Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
package org.citra.citra_emu.features.settings.model
|
||||
|
||||
interface AbstractMultiStringSetting : AbstractSetting {
|
||||
var strings: MutableSet<String>
|
||||
}
|
||||
|
|
@ -38,7 +38,6 @@ import org.citra.citra_emu.databinding.ListItemSettingsHeaderBinding
|
|||
import org.citra.citra_emu.features.settings.model.AbstractBooleanSetting
|
||||
import org.citra.citra_emu.features.settings.model.AbstractFloatSetting
|
||||
import org.citra.citra_emu.features.settings.model.AbstractIntSetting
|
||||
import org.citra.citra_emu.features.settings.model.AbstractMultiStringSetting
|
||||
import org.citra.citra_emu.features.settings.model.AbstractSetting
|
||||
import org.citra.citra_emu.features.settings.model.AbstractStringSetting
|
||||
import org.citra.citra_emu.features.settings.model.FloatSetting
|
||||
|
|
@ -803,7 +802,8 @@ class SettingsAdapter(
|
|||
private fun getSelectionForStringMultiChoiceValue(item: StringMultiChoiceSetting): BooleanArray {
|
||||
val values = item.selectedValues;
|
||||
val available_values = item.values;
|
||||
val res = BooleanArray(available_values?.size ?: 10){false}
|
||||
val res = BooleanArray(available_values?.size ?: 10){false} // 10 is used because we have 10 reasonable options.
|
||||
// prob shouldn't hardcode the size value here
|
||||
|
||||
|
||||
if (available_values != null) {
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ object ComboHelper {
|
|||
}
|
||||
|
||||
fun comboActivate(button: InputOverlayDrawableButton) {
|
||||
var comboArray = StringListSetting.COMBO_KEYS.list
|
||||
val comboArray = StringListSetting.COMBO_KEYS.list
|
||||
for (selected_button in comboArray) {
|
||||
var native_button = getButton(selected_button)
|
||||
val native_button = getButton(selected_button)
|
||||
if (native_button == -1)
|
||||
{
|
||||
//TODO: Need proper error handling here
|
||||
println("Bad Button")
|
||||
val cause = IllegalStateException("Button is not in bindable inputs.")
|
||||
throw IllegalArgumentException("Input must be non-negative.", cause)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue