FreeConsole() to avoid ugly console.

This commit is contained in:
Themaister 2011-04-23 14:47:50 +02:00
parent 4b60f98603
commit fcebad2589
2 changed files with 14 additions and 2 deletions

View File

@ -131,5 +131,9 @@ Network port used for netplay. This defaults to 55435. This option affects both
Attempts to apply an UPS patch to the current ROM image. No files are altered.
If this flag is not specified, SSNES will look for a .ups file with same basename as ROM specified.
.TP
\fB-D, --detach\fR
Detach from the current console. This is currently only relevant for Microsoft Windows.
.SH "SEE ALSO"
\fBssnes-joyconfig\fR(1)

12
ssnes.c
View File

@ -316,7 +316,8 @@ static void print_help(void)
puts("\t-r/--record: Path to record video file. Settings for video/audio codecs are found in config file.");
#endif
puts("\t-v/--verbose: Verbose logging");
puts("\t-U/--ups: Specifies path for UPS patch that will be applied to ROM.\n");
puts("\t-U/--ups: Specifies path for UPS patch that will be applied to ROM.");
puts("\t-D/--detach: Detach SSNES from the running console. Not relevant for all platforms.\n");
print_features();
}
@ -368,6 +369,7 @@ static void parse_input(int argc, char *argv[])
{ "frames", 1, NULL, 'F' },
{ "port", 1, &val, 'p' },
{ "ups", 1, NULL, 'U' },
{ "detach", 0, NULL, 'D' },
{ NULL, 0, NULL, 0 }
};
@ -385,7 +387,7 @@ static void parse_input(int argc, char *argv[])
#define CONFIG_FILE_ARG
#endif
char optstring[] = "hs:vS:m:p4jJg:b:B:Y:Z:P:HC:F:U:" FFMPEG_RECORD_ARG CONFIG_FILE_ARG;
char optstring[] = "hs:vS:m:p4jJg:b:B:Y:Z:P:HC:F:U:D" FFMPEG_RECORD_ARG CONFIG_FILE_ARG;
for(;;)
{
val = 0;
@ -504,6 +506,12 @@ static void parse_input(int argc, char *argv[])
strlcpy(g_extern.ups_name, optarg, sizeof(g_extern.ups_name));
break;
case 'D':
#ifdef _WIN32
FreeConsole();
#endif
break;
case 0:
switch (val)
{