Skip to content

Commit

Permalink
Unclog wl_display with wl_display_dispatch_pending()
Browse files Browse the repository at this point in the history
For some reason on Nvidia pro drivers the frame_callback
won't get called back after some random time.
Calling wl_display_dispatch_pending() seems to get it unstuck
with no negative effects I can see.
So while this feels like a hack, I'm going to just let it go.
  • Loading branch information
GhostNaN committed Apr 25, 2024
1 parent eaaed11 commit 9a03925
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,10 @@ int main(int argc, char **argv) {
if (fds[0].revents & POLLIN) {
if (wl_display_dispatch(state.display) == -1)
break;
} else {
if (wl_display_dispatch_pending(state.display) == -1)
break;
wl_display_flush(state.display);
}

// MPV is ready to draw a new frame
Expand Down

0 comments on commit 9a03925

Please sign in to comment.