Add some windows command line option hooks
This commit is contained in:
@@ -345,6 +345,13 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
||||
argv++;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
if (argcheck(argc, argv, ARG_WINDOWS) == 1) {
|
||||
argc--;
|
||||
argv++;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (argc > 1 && !strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') {
|
||||
/* avoid matching "-dec" for DECgraphics; since the man page
|
||||
* says -d directory, hope nobody's using -desomething_else
|
||||
|
||||
@@ -37,9 +37,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* runtime cursor display control switch */
|
||||
boolean win32_cursorblink;
|
||||
|
||||
/* globals required within here */
|
||||
HANDLE ffhandle = (HANDLE) 0;
|
||||
WIN32_FIND_DATA ffd;
|
||||
|
||||
typedef HWND(WINAPI *GETCONSOLEWINDOW)();
|
||||
static HWND GetConsoleHandle(void);
|
||||
static HWND GetConsoleHwnd(void);
|
||||
@@ -581,6 +585,25 @@ BOOL winos_font_support_cp437(HFONT hFont)
|
||||
return allFound;
|
||||
}
|
||||
|
||||
int
|
||||
windows_early_options(window_opt)
|
||||
const char *window_opt;
|
||||
{
|
||||
/*
|
||||
* If you return 2, the game will exit before it begins.
|
||||
* Return 1, to say the option parsed okay.
|
||||
* Return 0, to say the option was bad.
|
||||
*/
|
||||
|
||||
if (match_optname(window_opt, "cursorblink", 5, FALSE)) {
|
||||
win32_cursorblink = TRUE;
|
||||
return 1;
|
||||
} else {
|
||||
raw_printf(
|
||||
"-%swindows:cursorblink is the only supported option.\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* WIN32 */
|
||||
|
||||
/*winnt.c*/
|
||||
/*winnt.c*/
|
||||
|
||||
Reference in New Issue
Block a user