Fixed: DPAD buttons for setting backlight and volume
@@ -532,16 +532,16 @@ protected:
void update_item(const Item &item) override {
if(item.id == BACKLIGHT) {
- if (blit::buttons.pressed & blit::Button::DPAD_LEFT) {
+ if (blit::buttons & blit::Button::DPAD_LEFT) {
persist.backlight -= 1.0f / 256.0f;
- } else if (blit::buttons.pressed & blit::Button::DPAD_RIGHT) {
+ } else if (blit::buttons & blit::Button::DPAD_RIGHT) {
persist.backlight += 1.0f / 256.0f;
}
persist.backlight = std::fmin(1.0f, std::fmax(0.0f, persist.backlight));
} else if(item.id == VOLUME) {
- if (blit::buttons.pressed & blit::Button::DPAD_LEFT) {
+ if (blit::buttons & blit::Button::DPAD_LEFT) {
persist.volume -= 1.0f / 256.0f;
- } else if (blit::buttons.pressed & blit::Button::DPAD_RIGHT) {
+ } else if (blit::buttons & blit::Button::DPAD_RIGHT) {
persist.volume += 1.0f / 256.0f;
} else if (blit::buttons.released & blit::Button::A) {
persist.volume += 0.25f;
