mirror of https://github.com/mgba-emu/mgba.git
GBA Core: Fix initializing video render buffer
This commit is contained in:
parent
24f0be2862
commit
5ee1dfcea7
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue