mirror of https://github.com/mgba-emu/mgba.git
SDL: Better error checking
This commit is contained in:
parent
f05a385d6a
commit
f22391275b
|
@ -109,6 +109,9 @@ int main(int argc, char** argv) {
|
|||
GBASDLRunloop(&context, &renderer);
|
||||
|
||||
GBAThreadJoin(&context);
|
||||
if (GBAThreadHasCrashed(&context)) {
|
||||
printf("The game crashed!\n");
|
||||
}
|
||||
freeArguments(&args);
|
||||
GBAConfigFreeOpts(&opts);
|
||||
GBAConfigDeinit(&config);
|
||||
|
@ -122,6 +125,7 @@ int main(int argc, char** argv) {
|
|||
|
||||
static bool _GBASDLInit(struct SDLSoftwareRenderer* renderer) {
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
printf("Could not initialize video: %s\n", SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue