all repos — mgba @ 7a3db31eb2c58563184fe4e4a0806dd565d98b8c

mGBA Game Boy Advance Emulator

Perf: Return non-zero if a game crashes
Jeffrey Pfau jeffrey@endrift.com
Sat, 10 Jan 2015 04:00:22 -0800
commit

7a3db31eb2c58563184fe4e4a0806dd565d98b8c

parent

cd4c7900500bb690de251e08b8e21c9ef5a3b984

2 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/platform/perf-main.csrc/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.pytools/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)