Perf: Return non-zero if a game crashes
Jeffrey Pfau jeffrey@endrift.com
Sat, 10 Jan 2015 04:00:22 -0800
2 files changed,
2 insertions(+),
2 deletions(-)
M
src/platform/perf-main.c
→
src/platform/perf-main.c
@@ -121,7 +121,7 @@ } else {
printf("%u frames in %" PRIu64 " microseconds: %g fps (%gx)\n", frames, duration, scaledFrames / duration, scaledFrames / (duration * 60.f)); } - return 0; + return GBAThreadHasCrashed(&context); } static void _GBAPerfRunloop(struct GBAThread* context, int* frames, bool quiet) {
M
tools/perf.py
→
tools/perf.py
@@ -40,7 +40,7 @@ proc.wait()
except: proc.kill() raise - if proc.returncode < 0: + if proc.returncode: print('Game crashed!', file=sys.stderr) return reader = csv.DictReader(proc.stdout)