diff --git a/src/drivers/sdl/sdl.cpp b/src/drivers/sdl/sdl.cpp index c6980fed..c2c1a16b 100644 --- a/src/drivers/sdl/sdl.cpp +++ b/src/drivers/sdl/sdl.cpp @@ -496,6 +496,16 @@ void FCEUD_TraceInstruction() { */ int main(int argc, char *argv[]) { + // this is a hackish check for the --help arguemnts + // these are normally processed by the config parser, but SDL_Init + // must be run before the config parser: so if even SDL_Init fails, + // these four lines will still print the help output + if( !strcmp(argv[1], "--help") || !strcmp(argv[1],"-h")) + { + ShowUsage(argv[0]); + return 0; + } + int error, frameskip; FCEUD_Message("Starting "FCEU_NAME_AND_VERSION"...\n");