mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-26 03:01:50 +01:00
[SDL] use 'return' instead of 'exit' in main, removed useless buffer
This commit is contained in:
parent
d01c8bed7d
commit
1cbf897ed1
10
sdl/main.c
10
sdl/main.c
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user