mirror of
https://github.com/wiiu-env/WiiUPluginSystem.git
synced 2025-02-15 08:09:12 +01:00
WUPSButtonAPI: Check the button combo status after potentially updating the combo
This commit is contained in:
parent
94ce09af19
commit
d195b0b8e2
@ -139,11 +139,6 @@ namespace {
|
||||
int32_t getCurrentValueDisplayGeneric(void *context, bool isSelected, char *out_buf, int32_t out_size) {
|
||||
auto *item = static_cast<ConfigItemButtonCombo *>(context);
|
||||
|
||||
WUPSButtonCombo_ComboStatus comboStatus = WUPS_BUTTON_COMBO_COMBO_STATUS_INVALID_STATUS;
|
||||
if (const auto res = WUPSButtonComboAPI_GetButtonComboStatus(item->comboHandle, &comboStatus); res != WUPS_BUTTON_COMBO_ERROR_SUCCESS) {
|
||||
OSReport("WUPSConfigItemButtonCombo_getCurrentValueDisplayGeneric: GetButtonComboStatus returned %s\n", WUPSButtonComboAPI_GetStatusStr(res));
|
||||
}
|
||||
|
||||
switch (item->itemState) {
|
||||
case WUPS_CONFIG_ITEM_BUTTON_COMBO_STATE_INVALID_HANDLE: {
|
||||
snprintf(out_buf, out_size, "ERROR: Invalid combo handle");
|
||||
@ -174,6 +169,11 @@ namespace {
|
||||
break;
|
||||
}
|
||||
|
||||
WUPSButtonCombo_ComboStatus comboStatus = WUPS_BUTTON_COMBO_COMBO_STATUS_INVALID_STATUS;
|
||||
if (const auto res = WUPSButtonComboAPI_GetButtonComboStatus(item->comboHandle, &comboStatus); res != WUPS_BUTTON_COMBO_ERROR_SUCCESS) {
|
||||
OSReport("WUPSConfigItemButtonCombo_getCurrentValueDisplayGeneric: GetButtonComboStatus returned %s\n", WUPSButtonComboAPI_GetStatusStr(res));
|
||||
}
|
||||
|
||||
if (isSelected) {
|
||||
snprintf(out_buf, out_size, "(Press \ue000 to change) %s%s", comboStatus == WUPS_BUTTON_COMBO_COMBO_STATUS_VALID ? "" : "[CONFLICT] ", getComboAsString(item->currentButtonCombo).c_str());
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user