[SDL] use 'return' instead of 'exit' in main, removed useless buffer

This commit is contained in:
Clownacy 2016-10-20 23:26:58 +01:00
parent d01c8bed7d
commit 1cbf897ed1

View File

@ -710,7 +710,7 @@ int main (int argc, char **argv)
char caption[256];
sprintf(caption, "Genesis Plus GX\\SDL\nusage: %s gamename\n", argv[0]);
MessageBox(NULL, caption, "Information", 0);
exit(1);
return 1;
}
/* set default config */
@ -750,10 +750,8 @@ int main (int argc, char **argv)
/* initialize SDL */
if(SDL_Init(0) < 0)
{
char caption[256];
sprintf(caption, "SDL initialization failed");
MessageBox(NULL, caption, "Error", 0);
exit(1);
MessageBox(NULL, "SDL initialization failed", "Error", 0);
return 1;
}
sdl_video_init();
if (use_sound) sdl_sound_init();
@ -783,7 +781,7 @@ int main (int argc, char **argv)
char caption[256];
sprintf(caption, "Error loading file `%s'.", argv[1]);
MessageBox(NULL, caption, "Error", 0);
exit(1);
return 1;
}
/* initialize system hardware */