Skip to content

Commit

Permalink
Put timeout on poll() again
Browse files Browse the repository at this point in the history
mpvpaper can't properly quit if it's stuck on poll()
A 50ms timeout should be plenty and not hardware taxing.
  • Loading branch information
GhostNaN committed Jul 6, 2024
1 parent ec48b98 commit a445391
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ int main(int argc, char **argv) {
break;

// Wait for a mpv callback or wl_display event
if (poll(fds, sizeof(fds) / sizeof(fds[0]), -1) == -1 && errno != EINTR)
if (poll(fds, sizeof(fds) / sizeof(fds[0]), 50) == -1 && errno != EINTR)
break;

// If wl_display_prepare_read() was successful as 0
Expand Down

0 comments on commit a445391

Please sign in to comment.