wayland: Fix build warning (boolean always true)

main
Frank Praznik 2024-04-12 14:15:29 -04:00
parent f6edc2f603
commit 3fca8d4f82
No known key found for this signature in database
1 changed files with 6 additions and 8 deletions

View File

@ -255,14 +255,12 @@ static void Wayland_SortOutputs(SDL_VideoData *vid)
/* Sort the outputs by connector name. */
WAYLAND_wl_list_init(&sorted_list);
wl_list_for_each (c, &vid->output_order, link) {
if (c->wl_output_name) {
wl_list_for_each (d, &vid->output_list, link) {
if (d->wl_output_name && SDL_strcmp(c->wl_output_name, d->wl_output_name) == 0) {
/* Remove from the current list and Append the next node to the end of the new list. */
WAYLAND_wl_list_remove(&d->link);
WAYLAND_wl_list_insert(sorted_list.prev, &d->link);
break;
}
wl_list_for_each (d, &vid->output_list, link) {
if (d->wl_output_name && SDL_strcmp(c->wl_output_name, d->wl_output_name) == 0) {
/* Remove from the current list and Append the next node to the end of the new list. */
WAYLAND_wl_list_remove(&d->link);
WAYLAND_wl_list_insert(sorted_list.prev, &d->link);
break;
}
}
}