mirror of https://github.com/mgba-emu/mgba.git
SDL: Fix initialization ordering issues
This commit is contained in:
parent
509c80abad
commit
b865d8e479
|
@ -90,6 +90,12 @@ int main(int argc, char** argv) {
|
|||
freeArguments(&args);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!renderer.core->init(renderer.core)) {
|
||||
freeArguments(&args);
|
||||
return 1;
|
||||
}
|
||||
|
||||
renderer.core->desiredVideoDimensions(renderer.core, &renderer.width, &renderer.height);
|
||||
#ifdef BUILD_GL
|
||||
mSDLGLCreate(&renderer);
|
||||
|
@ -106,11 +112,6 @@ int main(int argc, char** argv) {
|
|||
opts.width = renderer.width * renderer.ratio;
|
||||
opts.height = renderer.height * renderer.ratio;
|
||||
|
||||
if (!renderer.core->init(renderer.core)) {
|
||||
freeArguments(&args);
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct mCheatDevice* device = NULL;
|
||||
if (args.cheatsFile && (device = renderer.core->cheatDevice(renderer.core))) {
|
||||
struct VFile* vf = VFileOpen(args.cheatsFile, O_RDONLY);
|
||||
|
|
Loading…
Reference in New Issue