GBA Core: Fix initializing video render buffer

This commit is contained in:
Jeffrey Pfau 2016-02-28 11:24:11 -08:00
parent 24f0be2862
commit 5ee1dfcea7
2 changed files with 4 additions and 4 deletions

View File

@ -44,6 +44,7 @@ static bool _GBACoreInit(struct mCore* core) {
ARMInit(cpu);
GBAVideoSoftwareRendererCreate(&gbacore->renderer);
gbacore->renderer.outputBuffer = NULL;
gbacore->keys = 0;
gba->keySource = &gbacore->keys;

View File

@ -103,10 +103,6 @@ int main(int argc, char** argv) {
didFail = 1;
goto cleanup;
}
if (!perfOpts.noVideo) {
core->setVideoBuffer(core, outputBuffer, 256);
}
if (perfOpts.savestate) {
_savestate = VFileOpen(perfOpts.savestate, O_RDONLY);
free(perfOpts.savestate);
@ -116,6 +112,9 @@ int main(int argc, char** argv) {
char gameCode[5] = { 0 };
core->init(core);
if (!perfOpts.noVideo) {
core->setVideoBuffer(core, outputBuffer, 256);
}
mCoreLoadFile(core, args.fname);
mCoreConfigInit(&core->config, "perf");
mCoreConfigLoad(&core->config);