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

@@ -147,6 +147,8 @@ update_io_pipeline()
.stats.temp = state.stats.temp,
.stats.tint = state.stats.tint,
.stats.focus = state.stats.focus,
.flash_enabled = state.flash_enabled,
};
mp_io_pipeline_update_state(&new_state);
}
@@ -197,7 +199,8 @@ update_state(const mp_state_main *new_state)
state.stats.focus = new_state->stats.focus;
// Make the right settings available for the camera
gtk_widget_set_visible(flash_button, state.control_flash);
// Even if there's no flash led/v4l, it'll just default to using the screen as flash, so always enable this button
gtk_widget_set_visible(flash_button, true);
gtk_widget_set_visible(iso_button, state.gain.control != 0);
gtk_widget_set_visible(shutter_button, state.exposure.control != 0);