all repos — mgba @ f22391275b49bcec3d94fb5e63c9983aef3ee0c3

mGBA Game Boy Advance Emulator

SDL: Better error checking
Jeffrey Pfau jeffrey@endrift.com
Thu, 08 Jan 2015 20:04:59 -0800
commit

f22391275b49bcec3d94fb5e63c9983aef3ee0c3

parent

f05a385d6afd6df4b7f846563c550b6f0e51e705

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/platform/sdl/main.csrc/platform/sdl/main.c

@@ -109,6 +109,9 @@

GBASDLRunloop(&context, &renderer); GBAThreadJoin(&context); + if (GBAThreadHasCrashed(&context)) { + printf("The game crashed!\n"); + } freeArguments(&args); GBAConfigFreeOpts(&opts); GBAConfigDeinit(&config);

@@ -122,6 +125,7 @@ }

static bool _GBASDLInit(struct SDLSoftwareRenderer* renderer) { if (SDL_Init(SDL_INIT_VIDEO) < 0) { + printf("Could not initialize video: %s\n", SDL_GetError()); return false; }