Add orientation change to button actions

This commit is contained in:
jpirnay
2026-05-04 13:27:40 +02:00
parent 4c936853b9
commit 6eae99362d
7 changed files with 33 additions and 2 deletions
@@ -995,6 +995,15 @@ void MdReaderActivity::onButtonAction(const CrossPointSettings::BUTTON_ACTION ac
ReaderUtils::enforceExitFullRefresh(renderer);
finish();
break;
case BA::BTN_CYCLE_ORIENTATION: {
const uint8_t nextOrientation =
static_cast<uint8_t>((SETTINGS.orientation + 1) % CrossPointSettings::ORIENTATION_COUNT);
SETTINGS.orientation = nextOrientation;
SETTINGS.saveToFile();
ReaderUtils::applyOrientation(renderer, SETTINGS.orientation);
requestUpdate();
break;
}
default:
break;
}