Skip to content

Commit

Permalink
modules/SceGxm: Workaround to prevent softlock when swapping images
Browse files Browse the repository at this point in the history
  • Loading branch information
Macdu committed Dec 19, 2023
1 parent 2d65c33 commit e2dfe04
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vita3k/modules/SceGxm/SceGxm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,11 @@ static void display_entry_thread(EmuEnvState &emuenv) {
SceGxmSyncObject *new_sync = display_callback->new_sync.get(emuenv.mem);

// Wait for fragment on the new buffer to finish
renderer::wishlist(new_sync, display_callback->new_sync_timestamp);
// set a (big) time limit to make sure we don't softlock
constexpr int one_second = 1'000'000;
if (!renderer::wishlist(new_sync, display_callback->new_sync_timestamp, one_second))
LOG_ERROR_ONCE("Failed to wait for the new frame to be ready");

// now we can remove the thread from the display queue
display_queue.pop();

Expand Down

0 comments on commit e2dfe04

Please sign in to comment.