Revert "Change Windows startup"
This reverts commit acb85b18cf.
Some optlist issues arose on some platforms, but not all.
I need to investigate the cause of those.
This commit is contained in:
@@ -73,6 +73,7 @@ static HWND GetConsoleHwnd(void);
|
||||
extern void backsp(void);
|
||||
#endif
|
||||
int windows_console_custom_nhgetch(void);
|
||||
extern void safe_routines(void);
|
||||
int windows_early_options(const char *window_opt);
|
||||
unsigned long sys_random_seed(void);
|
||||
#if 0
|
||||
@@ -292,6 +293,10 @@ win32_abort(void)
|
||||
exit_nhwindows((char *) 0);
|
||||
iflags.window_inited = FALSE;
|
||||
}
|
||||
#ifdef WIN32CON
|
||||
if (!WINDOWPORT(mswin) && !WINDOWPORT(safestartup))
|
||||
safe_routines();
|
||||
#endif
|
||||
if (wizard) {
|
||||
raw_print("Execute debug breakpoint wizard?");
|
||||
if ((c = nhgetch()) == 'y' || c == 'Y')
|
||||
@@ -517,6 +522,15 @@ nethack_exit(int code)
|
||||
* GUILaunched is defined and set in consoletty.c.
|
||||
*/
|
||||
|
||||
|
||||
#ifdef WIN32CON
|
||||
if (!GUILaunched) {
|
||||
windowprocs = *get_safe_procs(1);
|
||||
/* use our custom version which works
|
||||
a little cleaner than the stdio one */
|
||||
windowprocs.win_nhgetch = windows_console_custom_nhgetch;
|
||||
} else
|
||||
#endif
|
||||
if (getreturn_enabled) {
|
||||
raw_print("\n");
|
||||
if (iflags.window_inited)
|
||||
@@ -566,6 +580,10 @@ getreturn(const char *str)
|
||||
initializing the window port */
|
||||
void nethack_enter_windows(void)
|
||||
{
|
||||
#ifdef WIN32CON
|
||||
if (WINDOWPORT(tty))
|
||||
nethack_enter_consoletty();
|
||||
#endif
|
||||
}
|
||||
|
||||
/* CP437 to Unicode mapping according to the Unicode Consortium */
|
||||
|
||||
Reference in New Issue
Block a user