Add orientation change to button actions
This commit is contained in:
@@ -833,6 +833,15 @@ void TxtReaderActivity::onButtonAction(const CrossPointSettings::BUTTON_ACTION a
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user