all repos — mgba @ 492c2612b91d1491880a6b49ba1ade55c0cf8fdd

mGBA Game Boy Advance Emulator

Perf: Fix ordering of core deinitialization
Jeffrey Pfau jeffrey@endrift.com
Tue, 09 Aug 2016 02:06:03 -0700
commit

492c2612b91d1491880a6b49ba1ade55c0cf8fdd

parent

a6cbd7ddfe4f463b108c3e0eab87ff8da7091c14

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

jump to
M src/platform/test/perf-main.csrc/platform/test/perf-main.c

@@ -177,6 +177,8 @@ gettimeofday(&tv, 0);

uint64_t end = 1000000LL * tv.tv_sec + tv.tv_usec; uint64_t duration = end - start; + mCoreConfigFreeOpts(&opts); + mCoreConfigDeinit(&core->config); core->deinit(core); float scaledFrames = frames * 1000000.f;

@@ -197,8 +199,6 @@ } else {

printf("%u frames in %" PRIu64 " microseconds: %g fps (%gx)\n", frames, duration, scaledFrames / duration, scaledFrames / (duration * 60.f)); } - mCoreConfigFreeOpts(&opts); - mCoreConfigDeinit(&core->config); return true; }