Fix and improve switch camera and its error handling

This commit is contained in:
Kristian Vos
2024-04-26 15:03:29 +02:00
parent 76569c7b19
commit 98108a7f74

View File

@@ -730,7 +730,7 @@ static void
run_camera_switch_action(GSimpleAction *action, GVariant *param, gpointer user_data)
{
int new_index = state.camera->index + 1;
if (new_index > state.configuration->count) {
if (new_index > state.configuration->count - 1 || new_index < 0) {
new_index = 0;
}