| 48 | void OpdsSettingsActivity::onExit() { Activity::onExit(); } |
| 49 | |
| 50 | void OpdsSettingsActivity::loop() { |
| 51 | if (mappedInput.wasPressed(MappedInputManager::Button::Back)) { |
| 52 | finish(); |
| 53 | return; |
| 54 | } |
| 55 | |
| 56 | if (mappedInput.wasPressed(MappedInputManager::Button::Confirm)) { |
| 57 | handleSelection(); |
| 58 | return; |
| 59 | } |
| 60 | |
| 61 | const int menuItems = getMenuItemCount(); |
| 62 | buttonNavigator.onNext([this, menuItems] { |
| 63 | selectedIndex = (selectedIndex + 1) % menuItems; |
| 64 | requestUpdate(); |
| 65 | }); |
| 66 | |
| 67 | buttonNavigator.onPrevious([this, menuItems] { |
| 68 | selectedIndex = (selectedIndex + menuItems - 1) % menuItems; |
| 69 | requestUpdate(); |
| 70 | }); |
| 71 | } |
| 72 | |
| 73 | bool OpdsSettingsActivity::saveServer() { |
| 74 | bool success = false; |
nothing calls this directly
no test coverage detected