Perf: Return non-zero if a game crashes

This commit is contained in:
Jeffrey Pfau 2015-01-10 04:00:22 -08:00
parent cd4c790050
commit 7a3db31eb2
2 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ int main(int argc, char** argv) {
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) {

View File

@ -40,7 +40,7 @@ class PerfTest(object):
except:
proc.kill()
raise
if proc.returncode < 0:
if proc.returncode:
print('Game crashed!', file=sys.stderr)
return
reader = csv.DictReader(proc.stdout)