diff --git a/app/src/ui_controller.cpp b/app/src/ui_controller.cpp index 76104ff..a719a48 100644 --- a/app/src/ui_controller.cpp +++ b/app/src/ui_controller.cpp @@ -698,9 +698,8 @@ void UiController::adjust_rail_setting(int delta) { persist_config(); } else if (state_.rail_cursor == 2) { adjust_zoom(step); - } else if (state_.rail_cursor == 3) { - adjust_ev(step); } + // Card 3 (FREE) is a read-only storage indicator. break; } case AppMode::Timelapse: { diff --git a/app/tests/test_ui_controller.cpp b/app/tests/test_ui_controller.cpp index a856d61..60f2dde 100644 --- a/app/tests/test_ui_controller.cpp +++ b/app/tests/test_ui_controller.cpp @@ -273,6 +273,25 @@ void test_photo_controls_zoom_loupe_filters_and_timer() { assert(ctrl.consume_capture_flash()); assert(count_files_with_ext(out_dir, ".jpg") == 2); assert(count_hidden_files(out_dir) == 0); + + // Photo rail_cursor == 1 adjusts EV across [-2.0, +2.0] in 0.5 steps + assert(ctrl.state().rail_cursor == 1); + assert(ctrl.state().config.ev == 0.0); + for (int i = 1; i <= 5; ++i) { + ctrl.handle_key(0, cz::KeyCode::Right, now); + } + assert(ctrl.state().config.ev == 2.0); + assert(spy->last_ev == 2.0f); + for (int i = 1; i <= 9; ++i) { + ctrl.handle_key(0, cz::KeyCode::Left, now); + } + assert(ctrl.state().config.ev == -2.0); + assert(spy->last_ev == -2.0f); + for (int i = 1; i <= 4; ++i) { + ctrl.handle_key(0, cz::KeyCode::Right, now); + } + assert(ctrl.state().config.ev == 0.0); + assert(cz::load_config(cfg_path).ev == 0.0); } void test_rail_side_and_theme_toggles_persist() { @@ -357,6 +376,22 @@ void test_video_mode_locks_transitions_while_recording() { ctrl.handle_key('M', cz::KeyCode::Char, now); assert(ctrl.state().config.video_audio); + // Video rail Card 3 (FREE) is read-only and must not mutate EV + const double ev_before = ctrl.state().config.ev; + while (ctrl.state().rail_cursor < 3) { + ctrl.handle_key(0, cz::KeyCode::Down, now); + } + assert(ctrl.state().rail_cursor == 3); + ctrl.handle_key(0, cz::KeyCode::Left, now); + assert(ctrl.state().config.ev == ev_before); + ctrl.handle_key(0, cz::KeyCode::Right, now); + assert(ctrl.state().config.ev == ev_before); + ctrl.handle_key('h', cz::KeyCode::Char, now); + assert(ctrl.state().config.ev == ev_before); + ctrl.handle_key('l', cz::KeyCode::Char, now); + assert(ctrl.state().config.ev == ev_before); + assert(cz::load_config(cfg_path).ev == ev_before); + // Start recording with Enter ctrl.handle_key(0, cz::KeyCode::Enter, now); assert(ctrl.state().video_recording);