all repos — mgba @ 030f12e39fe947a34c5fcd841bfc4e8ff7fe9071

mGBA Game Boy Advance Emulator

Perf: Detect idle loops by default
Jeffrey Pfau jeffrey@endrift.com
Tue, 20 Jan 2015 23:26:48 -0800
commit

030f12e39fe947a34c5fcd841bfc4e8ff7fe9071

parent

fc172147eea8a5c8a7fba3b74d21caab845e6705

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

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

@@ -56,7 +56,11 @@ struct GBAConfig config;

GBAConfigInit(&config, "perf"); GBAConfigLoad(&config); - struct GBAOptions opts = {}; + struct GBAOptions opts = { + .idleOptimization = IDLE_LOOP_DETECT + }; + GBAConfigLoadDefaults(&config, &opts); + struct GBAArguments args = {}; if (!parseArguments(&args, &config, argc, argv, &subparser)) { usage(argv[0], PERF_USAGE);

@@ -69,7 +73,7 @@

renderer.outputBuffer = malloc(256 * 256 * 4); renderer.outputBufferStride = 256; - struct GBAThread context = { }; + struct GBAThread context = {}; _thread = &context; if (!perfOpts.noVideo) {