mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-11-22 04:39:17 +01:00
Config: Move "onButtonPressed" check out of the loop
This commit is contained in:
parent
030c9b4265
commit
9dc58d389f
@ -503,6 +503,10 @@ void ConfigUtils::displayMenu() {
|
|||||||
prevSelectedItem = (int32_t) selectedBtn;
|
prevSelectedItem = (int32_t) selectedBtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pressedButtons != WUPS_CONFIG_BUTTON_NONE) {
|
||||||
|
config_items[selectedBtn]->onButtonPressed(pressedButtons);
|
||||||
|
}
|
||||||
|
|
||||||
DrawUtils::beginDraw();
|
DrawUtils::beginDraw();
|
||||||
DrawUtils::clear(COLOR_BACKGROUND);
|
DrawUtils::clear(COLOR_BACKGROUND);
|
||||||
|
|
||||||
@ -520,9 +524,6 @@ void ConfigUtils::displayMenu() {
|
|||||||
DrawUtils::setFontSize(24);
|
DrawUtils::setFontSize(24);
|
||||||
DrawUtils::print(16 * 2, index + 8 + 24, config_items[i]->getDisplayName().c_str());
|
DrawUtils::print(16 * 2, index + 8 + 24, config_items[i]->getDisplayName().c_str());
|
||||||
if (i == selectedBtn) {
|
if (i == selectedBtn) {
|
||||||
if (pressedButtons != WUPS_CONFIG_BUTTON_NONE) {
|
|
||||||
config_items[i]->onButtonPressed(pressedButtons);
|
|
||||||
}
|
|
||||||
DrawUtils::print(SCREEN_WIDTH - 16 * 2, index + 8 + 24, config_items[i]->getCurrentValueSelectedDisplay().c_str(), true);
|
DrawUtils::print(SCREEN_WIDTH - 16 * 2, index + 8 + 24, config_items[i]->getCurrentValueSelectedDisplay().c_str(), true);
|
||||||
} else {
|
} else {
|
||||||
DrawUtils::print(SCREEN_WIDTH - 16 * 2, index + 8 + 24, config_items[i]->getCurrentValueDisplay().c_str(), true);
|
DrawUtils::print(SCREEN_WIDTH - 16 * 2, index + 8 + 24, config_items[i]->getCurrentValueDisplay().c_str(), true);
|
||||||
|
Loading…
Reference in New Issue
Block a user