fix(ui): restrict joystick rotation setting to e-ink builds only

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-23 15:33:03 +02:00
co-authored by Claude Sonnet 4.6
parent fea1be8e81
commit 52faa0e2f6
@@ -24,7 +24,7 @@ class SettingsScreen : public UIScreen {
#if defined(EINK_DISPLAY_MODEL) #if defined(EINK_DISPLAY_MODEL)
ROTATION, ROTATION,
#endif #endif
#if defined(UI_HAS_JOYSTICK) #if defined(EINK_DISPLAY_MODEL)
JOY_ROTATION, JOY_ROTATION,
#endif #endif
// Sound section // Sound section
@@ -447,7 +447,7 @@ class SettingsScreen : public UIScreen {
uint8_t r = p ? (p->display_rotation & 3) : 0; uint8_t r = p ? (p->display_rotation & 3) : 0;
display.print(ROT_LABELS[r]); } display.print(ROT_LABELS[r]); }
#endif #endif
#if defined(UI_HAS_JOYSTICK) #if defined(EINK_DISPLAY_MODEL)
} else if (item == JOY_ROTATION) { } else if (item == JOY_ROTATION) {
display.print("Joystick"); display.print("Joystick");
display.setCursor(display.valCol(), y); display.setCursor(display.valCol(), y);
@@ -678,7 +678,7 @@ public:
return true; return true;
} }
#endif #endif
#if defined(UI_HAS_JOYSTICK) #if defined(EINK_DISPLAY_MODEL)
if (_selected == JOY_ROTATION && p && (left || right || enter)) { if (_selected == JOY_ROTATION && p && (left || right || enter)) {
p->joystick_rotation = (p->joystick_rotation + (left ? 3 : 1)) & 3; p->joystick_rotation = (p->joystick_rotation + (left ? 3 : 1)) & 3;
_dirty = true; _dirty = true;