2024-03-24 02:15:57 +01:00
|
|
|
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
2024-03-12 03:30:43 +01:00
|
|
|
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
2024-03-05 09:42:40 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
2024-04-01 02:08:49 +02:00
|
|
|
package dev.suyu.suyu_emu.features.input.model
|
2024-03-05 09:42:40 +01:00
|
|
|
|
|
|
|
import androidx.annotation.StringRes
|
2024-04-01 02:08:49 +02:00
|
|
|
import dev.suyu.suyu_emu.R
|
2024-03-05 09:42:40 +01:00
|
|
|
|
|
|
|
// Must match enum in src/core/hid/hid_types.h
|
|
|
|
enum class NpadStyleIndex(val int: Int, @StringRes val nameId: Int = 0) {
|
|
|
|
None(0),
|
|
|
|
Fullkey(3, R.string.pro_controller),
|
|
|
|
Handheld(4, R.string.handheld),
|
|
|
|
HandheldNES(4),
|
|
|
|
JoyconDual(5, R.string.dual_joycons),
|
|
|
|
JoyconLeft(6, R.string.left_joycon),
|
|
|
|
JoyconRight(7, R.string.right_joycon),
|
|
|
|
GameCube(8, R.string.gamecube_controller),
|
|
|
|
Pokeball(9),
|
|
|
|
NES(10),
|
|
|
|
SNES(12),
|
|
|
|
N64(13),
|
|
|
|
SegaGenesis(14),
|
|
|
|
SystemExt(32),
|
|
|
|
System(33);
|
|
|
|
|
|
|
|
companion object {
|
|
|
|
fun from(int: Int): NpadStyleIndex = entries.firstOrNull { it.int == int } ?: None
|
|
|
|
}
|
|
|
|
}
|