mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-22 06:35:57 +01:00
screencast: fix check on loop_iterate
According to the documentation [1] pw_loop_iterate (a macro for spa_loop_control_iterate) will return the number of dispatched fd's and thus we should check only negative return values. [1] https://docs.pipewire.org/group__spa__loop.html#ga3bae0b32100f5752b3372a505c8e04f6
This commit is contained in:
parent
55d73ab647
commit
c34d09877c
1 changed files with 2 additions and 1 deletions
|
@ -432,8 +432,9 @@ static int method_screencast_start(sd_bus_message *msg, void *data,
|
|||
|
||||
while (cast->node_id == SPA_ID_INVALID) {
|
||||
int ret = pw_loop_iterate(state->pw_loop, 0);
|
||||
if (ret != 0) {
|
||||
if (ret < 0) {
|
||||
logprint(ERROR, "pipewire_loop_iterate failed: %s", spa_strerror(ret));
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue