Fix and improve switch camera and its error handling
This commit is contained in:
@@ -730,7 +730,7 @@ static void
|
|||||||
run_camera_switch_action(GSimpleAction *action, GVariant *param, gpointer user_data)
|
run_camera_switch_action(GSimpleAction *action, GVariant *param, gpointer user_data)
|
||||||
{
|
{
|
||||||
int new_index = state.camera->index + 1;
|
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;
|
new_index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user