mirror of https://github.com/mpv-player/mpv
wayland: drop some unneeded curly braces (no-op)
Not sure why all of these single line if's were being braced. Probably some cargo cult from years ago but might as well fix it now since it's bothering me.
This commit is contained in:
parent
f0a6578259
commit
661f45377a
|
@ -1431,9 +1431,8 @@ static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id
|
|||
wl_surface_add_listener(wl->surface, &surface_listener, wl);
|
||||
}
|
||||
|
||||
if (!strcmp(interface, wl_subcompositor_interface.name) && (ver >= 1) && found++) {
|
||||
if (!strcmp(interface, wl_subcompositor_interface.name) && (ver >= 1) && found++)
|
||||
wl->subcompositor = wl_registry_bind(reg, id, &wl_subcompositor_interface, 1);
|
||||
}
|
||||
|
||||
if (!strcmp (interface, zwp_linux_dmabuf_v1_interface.name) && (ver >= 4) && found++) {
|
||||
wl->dmabuf = wl_registry_bind(reg, id, &zwp_linux_dmabuf_v1_interface, 4);
|
||||
|
@ -1441,13 +1440,11 @@ static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id
|
|||
zwp_linux_dmabuf_feedback_v1_add_listener(wl->dmabuf_feedback, &dmabuf_feedback_listener, wl);
|
||||
}
|
||||
|
||||
if (!strcmp (interface, wp_viewporter_interface.name) && (ver >= 1) && found++) {
|
||||
if (!strcmp (interface, wp_viewporter_interface.name) && (ver >= 1) && found++)
|
||||
wl->viewporter = wl_registry_bind (reg, id, &wp_viewporter_interface, 1);
|
||||
}
|
||||
|
||||
if (!strcmp(interface, wl_data_device_manager_interface.name) && (ver >= 3) && found++) {
|
||||
if (!strcmp(interface, wl_data_device_manager_interface.name) && (ver >= 3) && found++)
|
||||
wl->dnd_devman = wl_registry_bind(reg, id, &wl_data_device_manager_interface, 3);
|
||||
}
|
||||
|
||||
if (!strcmp(interface, wl_output_interface.name) && (ver >= 2) && found++) {
|
||||
struct vo_wayland_output *output = talloc_zero(wl, struct vo_wayland_output);
|
||||
|
@ -1484,30 +1481,25 @@ static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id
|
|||
wl_list_insert(&wl->seat_list, &seat->link);
|
||||
}
|
||||
|
||||
if (!strcmp(interface, wl_shm_interface.name) && found++) {
|
||||
if (!strcmp(interface, wl_shm_interface.name) && found++)
|
||||
wl->shm = wl_registry_bind(reg, id, &wl_shm_interface, 1);
|
||||
}
|
||||
|
||||
#if HAVE_WAYLAND_PROTOCOLS_1_27
|
||||
if (!strcmp(interface, wp_content_type_manager_v1_interface.name) && found++) {
|
||||
if (!strcmp(interface, wp_content_type_manager_v1_interface.name) && found++)
|
||||
wl->content_type_manager = wl_registry_bind(reg, id, &wp_content_type_manager_v1_interface, 1);
|
||||
}
|
||||
|
||||
if (!strcmp(interface, wp_single_pixel_buffer_manager_v1_interface.name) && found++) {
|
||||
if (!strcmp(interface, wp_single_pixel_buffer_manager_v1_interface.name) && found++)
|
||||
wl->single_pixel_manager = wl_registry_bind(reg, id, &wp_single_pixel_buffer_manager_v1_interface, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAVE_WAYLAND_PROTOCOLS_1_31
|
||||
if (!strcmp(interface, wp_fractional_scale_manager_v1_interface.name) && found++) {
|
||||
if (!strcmp(interface, wp_fractional_scale_manager_v1_interface.name) && found++)
|
||||
wl->fractional_scale_manager = wl_registry_bind(reg, id, &wp_fractional_scale_manager_v1_interface, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAVE_WAYLAND_PROTOCOLS_1_32
|
||||
if (!strcmp(interface, wp_cursor_shape_manager_v1_interface.name) && found++) {
|
||||
if (!strcmp(interface, wp_cursor_shape_manager_v1_interface.name) && found++)
|
||||
wl->cursor_shape_manager = wl_registry_bind(reg, id, &wp_cursor_shape_manager_v1_interface, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!strcmp(interface, wp_presentation_interface.name) && found++) {
|
||||
|
@ -1521,13 +1513,11 @@ static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id
|
|||
xdg_wm_base_add_listener(wl->wm_base, &xdg_wm_base_listener, wl);
|
||||
}
|
||||
|
||||
if (!strcmp(interface, zxdg_decoration_manager_v1_interface.name) && found++) {
|
||||
if (!strcmp(interface, zxdg_decoration_manager_v1_interface.name) && found++)
|
||||
wl->xdg_decoration_manager = wl_registry_bind(reg, id, &zxdg_decoration_manager_v1_interface, 1);
|
||||
}
|
||||
|
||||
if (!strcmp(interface, zwp_idle_inhibit_manager_v1_interface.name) && found++) {
|
||||
if (!strcmp(interface, zwp_idle_inhibit_manager_v1_interface.name) && found++)
|
||||
wl->idle_inhibit_manager = wl_registry_bind(reg, id, &zwp_idle_inhibit_manager_v1_interface, 1);
|
||||
}
|
||||
|
||||
if (found > 1)
|
||||
MP_VERBOSE(wl, "Registered for protocol %s\n", interface);
|
||||
|
|
Loading…
Reference in New Issue