1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-26 05:42:17 +00:00

strat/cfg: Update for new libnx HID interface

This commit is contained in:
fincs 2020-12-02 00:50:14 +01:00 committed by SciresM
parent a03ee7b148
commit f86059de70

View file

@ -34,7 +34,7 @@ namespace ams::cfg {
constexpr ProgramOverrideKey DefaultAppletPhotoViewerOverrideKey = {
.override_key = {
.key_combination = KEY_R,
.key_combination = HidNpadButton_R,
.override_by_default = true,
},
.program_id = ncm::SystemAppletId::PhotoViewer,
@ -58,12 +58,12 @@ namespace ams::cfg {
/* Override globals. */
OverrideKey g_default_override_key = {
.key_combination = KEY_L,
.key_combination = HidNpadButton_L,
.override_by_default = true,
};
OverrideKey g_default_cheat_enable_key = {
.key_combination = KEY_L,
.key_combination = HidNpadButton_L,
.override_by_default = true,
};
@ -89,7 +89,7 @@ namespace ams::cfg {
impl::OverrideStatusFlag_AddressSpace64Bit,
},
.override_any_app_key = {
.key_combination = KEY_R,
.key_combination = HidNpadButton_R,
.override_by_default = false,
},
.override_any_app_as_flag = impl::OverrideStatusFlag_AddressSpace64Bit,
@ -110,41 +110,41 @@ namespace ams::cfg {
/* Parse key combination. */
if (strcasecmp(value, "A") == 0) {
cfg.key_combination = KEY_A;
cfg.key_combination = HidNpadButton_A;
} else if (strcasecmp(value, "B") == 0) {
cfg.key_combination = KEY_B;
cfg.key_combination = HidNpadButton_B;
} else if (strcasecmp(value, "X") == 0) {
cfg.key_combination = KEY_X;
cfg.key_combination = HidNpadButton_X;
} else if (strcasecmp(value, "Y") == 0) {
cfg.key_combination = KEY_Y;
cfg.key_combination = HidNpadButton_Y;
} else if (strcasecmp(value, "LS") == 0) {
cfg.key_combination = KEY_LSTICK;
cfg.key_combination = HidNpadButton_StickL;
} else if (strcasecmp(value, "RS") == 0) {
cfg.key_combination = KEY_RSTICK;
cfg.key_combination = HidNpadButton_StickR;
} else if (strcasecmp(value, "L") == 0) {
cfg.key_combination = KEY_L;
cfg.key_combination = HidNpadButton_L;
} else if (strcasecmp(value, "R") == 0) {
cfg.key_combination = KEY_R;
cfg.key_combination = HidNpadButton_R;
} else if (strcasecmp(value, "ZL") == 0) {
cfg.key_combination = KEY_ZL;
cfg.key_combination = HidNpadButton_ZL;
} else if (strcasecmp(value, "ZR") == 0) {
cfg.key_combination = KEY_ZR;
cfg.key_combination = HidNpadButton_ZR;
} else if (strcasecmp(value, "PLUS") == 0) {
cfg.key_combination = KEY_PLUS;
cfg.key_combination = HidNpadButton_Plus;
} else if (strcasecmp(value, "MINUS") == 0) {
cfg.key_combination = KEY_MINUS;
cfg.key_combination = HidNpadButton_Minus;
} else if (strcasecmp(value, "DLEFT") == 0) {
cfg.key_combination = KEY_DLEFT;
cfg.key_combination = HidNpadButton_Left;
} else if (strcasecmp(value, "DUP") == 0) {
cfg.key_combination = KEY_DUP;
cfg.key_combination = HidNpadButton_Up;
} else if (strcasecmp(value, "DRIGHT") == 0) {
cfg.key_combination = KEY_DRIGHT;
cfg.key_combination = HidNpadButton_Right;
} else if (strcasecmp(value, "DDOWN") == 0) {
cfg.key_combination = KEY_DDOWN;
cfg.key_combination = HidNpadButton_Down;
} else if (strcasecmp(value, "SL") == 0) {
cfg.key_combination = KEY_SL;
cfg.key_combination = HidNpadButton_AnySL;
} else if (strcasecmp(value, "SR") == 0) {
cfg.key_combination = KEY_SR;
cfg.key_combination = HidNpadButton_AnySR;
}
return cfg;