Refactor camera control functions to use MPControl, store fd in MPControl

This commit is contained in:
Kristian Vos
2024-08-03 15:44:34 +02:00
committed by Martijn Braam
parent cd392d85cd
commit 3280c1d113
7 changed files with 121 additions and 147 deletions

View File

@@ -199,10 +199,10 @@ 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(iso_button, state.gain.control.id != 0);
gtk_widget_set_visible(shutter_button, state.exposure.control.id != 0);
// 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);
return false;
}