mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-13 19:59:07 +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];
|
char caption[256];
|
||||||
sprintf(caption, "Genesis Plus GX\\SDL\nusage: %s gamename\n", argv[0]);
|
sprintf(caption, "Genesis Plus GX\\SDL\nusage: %s gamename\n", argv[0]);
|
||||||
MessageBox(NULL, caption, "Information", 0);
|
MessageBox(NULL, caption, "Information", 0);
|
||||||
exit(1);
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set default config */
|
/* set default config */
|
||||||
@ -750,10 +750,8 @@ int main (int argc, char **argv)
|
|||||||
/* initialize SDL */
|
/* initialize SDL */
|
||||||
if(SDL_Init(0) < 0)
|
if(SDL_Init(0) < 0)
|
||||||
{
|
{
|
||||||
char caption[256];
|
MessageBox(NULL, "SDL initialization failed", "Error", 0);
|
||||||
sprintf(caption, "SDL initialization failed");
|
return 1;
|
||||||
MessageBox(NULL, caption, "Error", 0);
|
|
||||||
exit(1);
|
|
||||||
}
|
}
|
||||||
sdl_video_init();
|
sdl_video_init();
|
||||||
if (use_sound) sdl_sound_init();
|
if (use_sound) sdl_sound_init();
|
||||||
@ -783,7 +781,7 @@ int main (int argc, char **argv)
|
|||||||
char caption[256];
|
char caption[256];
|
||||||
sprintf(caption, "Error loading file `%s'.", argv[1]);
|
sprintf(caption, "Error loading file `%s'.", argv[1]);
|
||||||
MessageBox(NULL, caption, "Error", 0);
|
MessageBox(NULL, caption, "Error", 0);
|
||||||
exit(1);
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* initialize system hardware */
|
/* initialize system hardware */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user