SDL: Better error checking
Jeffrey Pfau jeffrey@endrift.com
Thu, 08 Jan 2015 20:04:59 -0800
1 files changed,
4 insertions(+),
0 deletions(-)
jump to
M
src/platform/sdl/main.c
→
src/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; }