| 116 | } |
| 117 | |
| 118 | int MappedInputManager::getPressedFrontButton() const { |
| 119 | // Scan the raw front buttons in hardware order. |
| 120 | // This bypasses remapping so the remap activity can capture physical presses. |
| 121 | if (gpio.wasPressed(HalGPIO::BTN_BACK)) { |
| 122 | return HalGPIO::BTN_BACK; |
| 123 | } |
| 124 | if (gpio.wasPressed(HalGPIO::BTN_CONFIRM)) { |
| 125 | return HalGPIO::BTN_CONFIRM; |
| 126 | } |
| 127 | if (gpio.wasPressed(HalGPIO::BTN_LEFT)) { |
| 128 | return HalGPIO::BTN_LEFT; |
| 129 | } |
| 130 | if (gpio.wasPressed(HalGPIO::BTN_RIGHT)) { |
| 131 | return HalGPIO::BTN_RIGHT; |
| 132 | } |
| 133 | return -1; |
| 134 | } |