E void FDECL(set_output_mode, (int));
E void NDECL(synch_cursor);
E void NDECL(nethack_enter_nttty);
+E void NDECL(nttty_exit);
#endif
/* ### o_init.c ### */
static boolean NDECL(check_font_widths);
static void NDECL(set_known_good_console_font);
static void NDECL(restore_original_console_font);
+extern void NDECL(safe_routines);
/* Win32 Screen buffer,coordinate,console I/O information */
COORD ntcoord;
really_move_cursor();
}
+void
+nttty_exit()
+{
+ /* go back to using the safe routines */
+ safe_routines();
+}
+
int
process_keystroke(ir, valid, numberpad, portdebug)
INPUT_RECORD *ir;
}
}
+#if 0
/* early_raw_print() is used during early game intialization prior to the
* setting up of the windowing system. This allows early errors and panics
* to have there messages displayed.
SetConsoleCursorPosition(console.hConOut, console.cursor);
}
+#endif
-/* nethack_enter_nttty() is the first thing that is called from main.
+/* nethack_enter_nttty() is the first thing that is called from main
+ * once the tty port is confirmed.
*
* We initialize all console state to support rendering to the console
* through out flipping support at this time. This allows us to support
void nethack_enter_nttty()
{
+#if 0
/* set up state needed by early_raw_print() */
windowprocs.win_raw_print = early_raw_print;
-
+#endif
console.hConOut = GetStdHandle(STD_OUTPUT_HANDLE);
nhassert(console.hConOut != NULL); // NOTE: this assert will not print
char FDECL(windows_yn_function, (const char *, const char *, CHAR_P));
void FDECL(windows_getlin, (const char *, char *));
extern int NDECL(windows_console_custom_nhgetch);
+void NDECL(safe_routines);
char orgdir[PATHLEN];
char *dir;
* Get a set of valid safe windowport function
* pointers during early startup initialization.
*/
- if (!WINDOWPORT("safe-startup"))
- windowprocs = *get_safe_procs(1);
- if (!GUILaunched)
- windowprocs.win_nhgetch = windows_console_custom_nhgetch;
-
+ safe_routines();
sys_early_init();
#ifdef _MSC_VER
# ifdef DEBUG
#undef ADD_USAGE
}
+void
+safe_routines(VOID_ARGS)
+{
+ /*
+ * Get a set of valid safe windowport function
+ * pointers during early startup initialization.
+ */
+ if (!WINDOWPORT("safe-startup"))
+ windowprocs = *get_safe_procs(1);
+ if (!GUILaunched)
+ windowprocs.win_nhgetch = windows_console_custom_nhgetch;
+}
+
#ifdef PORT_HELP
void
port_help()