From 42c08e6123be795570ec8a1f070bb95644442ddb Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Wed, 19 Aug 2015 19:20:47 +0200 Subject: [PATCH] gsdx-debug: infinite replay for value > 90 Allow to use Nvidia debugger & give time to see the glitches --- plugins/GSdx/GS.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index fdebed9ab6..c6d53d2618 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -1670,14 +1670,18 @@ EXPORT_C GSReplay(char* lpszCmdLine, int renderer) // Ensure the rendering is complete to measure correctly the time. glFinish(); - unsigned long end = timeGetTime(); - fprintf(stderr, "The %ld frames of the scene was render on %ldms\n", frame_number, end - start); - fprintf(stderr, "A means of %fms by frame\n", (float)(end - start)/(float)frame_number); + if (finished > 90) { + sleep(1); + } else { + unsigned long end = timeGetTime(); + fprintf(stderr, "The %ld frames of the scene was render on %ldms\n", frame_number, end - start); + fprintf(stderr, "A means of %fms by frame\n", (float)(end - start)/(float)frame_number); - stats.push_back((float)(end - start)); + stats.push_back((float)(end - start)); - finished--; - total_frame_nb += frame_number; + finished--; + total_frame_nb += frame_number; + } } if (theApp.GetConfig("linux_replay", 1) > 1) {