Re-enable flash, refactor to use libmegapixels

This commit is contained in:
Kristian Vos
2024-07-24 13:57:54 +02:00
parent 2bbc0f387f
commit b1c46f7800
7 changed files with 43 additions and 106 deletions

View File

@@ -1315,6 +1315,8 @@ update_state(MPPipeline *pipeline, const mp_state_proc *new_state)
state_proc.balance[1] = new_state->balance[1];
state_proc.balance[2] = new_state->balance[2];
state_proc.flash_enabled = new_state->flash_enabled;
if (output_changed) {
state_proc.camera_rotation = mod(
state_proc.mode->rotation - state_proc.device_rotation, 360);
@@ -1337,7 +1339,6 @@ update_state(MPPipeline *pipeline, const mp_state_proc *new_state)
.has_auto_focus_start = false,
.preview_buffer_width = output_buffer_width,
.preview_buffer_height = output_buffer_height,
.control_flash = false,
.gain.control = state_proc.gain.control,
.gain.auto_control = state_proc.gain.auto_control,
@@ -1363,6 +1364,8 @@ update_state(MPPipeline *pipeline, const mp_state_proc *new_state)
.stats.temp = state_proc.stats.temp,
.stats.tint = state_proc.stats.tint,
.stats.focus = state_proc.stats.focus,
.flash_enabled = state_proc.flash_enabled,
};
mp_main_update_state(&new_main);
}