mirror of https://github.com/mgba-emu/mgba.git
Perf: Return non-zero if a game crashes
This commit is contained in:
parent
cd4c790050
commit
7a3db31eb2
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue