Added warning for SDL init failure

This commit is contained in:
Hitomi Nakayama 2023-10-12 17:57:33 -07:00
parent 5192e3a07b
commit d267d83cec
1 changed files with 4 additions and 1 deletions

View File

@ -1026,7 +1026,10 @@ int main(int argc, char **argv)
signal(SIGINT, debugger_interrupt);
signal(SIGUSR1, debugger_reset);
SDL_Init(SDL_INIT_EVERYTHING & ~SDL_INIT_AUDIO);
if (SDL_Init(SDL_INIT_EVERYTHING & ~SDL_INIT_AUDIO) < 0) {
fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
}
if ((console_supported = CON_start(completer))) {
CON_set_repeat_empty(true);
CON_printf("SameBoy v" GB_VERSION "\n");