Skip to content

Commit

Permalink
Merge pull request libretro#6848 from reswitched/fix-tearing
Browse files Browse the repository at this point in the history
NSW: fix tearing
  • Loading branch information
inactive123 authored May 31, 2018
2 parents 0045e1f + 1404b63 commit 49c08ba
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gfx/drivers/switch_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,14 @@ static bool switch_frame(void *data, const void *frame,
RARCH_LOG("message: %s\n", msg);

r = surface_dequeue_buffer(&sw->surface, &out_buffer);
if (sw->vsync)
switch_wait_vsync(sw);
svcSleepThread(10000);
if(r != RESULT_OK) {
return true; // just skip the frame
}


r = surface_wait_buffer(&sw->surface);
if(r != RESULT_OK) {
return true;
}
gfx_slow_swizzling_blit(out_buffer, sw->image, 1280, 720, 0, 0);

r = surface_queue_buffer(&sw->surface);
Expand Down

0 comments on commit 49c08ba

Please sign in to comment.