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:
@@ -15,6 +15,10 @@
|
||||
#include "mhmain.h"
|
||||
#include "mhmap.h"
|
||||
|
||||
#if !defined(SAFEPROCS)
|
||||
#error You must #define SAFEPROCS to build NetHackW.c
|
||||
#endif
|
||||
|
||||
/* Borland and MinGW redefine "boolean" in shlwapi.h,
|
||||
so just use the little bit we need */
|
||||
typedef struct _DLLVERSIONINFO {
|
||||
@@ -95,6 +99,32 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
UNREFERENCED_PARAMETER(nCmdShow);
|
||||
|
||||
/*
|
||||
* Get a set of valid safe windowport function
|
||||
* pointers during early startup initialization.
|
||||
*
|
||||
* When get_safe_procs is called with 0 as the param,
|
||||
* non-functional, but safe function pointers are set
|
||||
* for all windowport routines.
|
||||
*
|
||||
* When get_safe_procs is called with 1 as the param,
|
||||
* raw_print, raw_print_bold, and wait_synch, and nhgetch
|
||||
* are set to use C stdio routines via stdio_raw_print,
|
||||
* stdio_raw_print_bold, stdio_wait_synch, and
|
||||
* stdio_nhgetch.
|
||||
*/
|
||||
windowprocs = *get_safe_procs(0);
|
||||
|
||||
/*
|
||||
* Now we are going to override a couple
|
||||
* of the windowprocs functions so that
|
||||
* error messages are handled in a suitable
|
||||
* way for the graphical version.
|
||||
*/
|
||||
windowprocs.win_raw_print = mswin_raw_print;
|
||||
windowprocs.win_raw_print_bold = mswin_raw_print_bold;
|
||||
windowprocs.win_wait_synch = mswin_wait_synch;
|
||||
|
||||
win10_init();
|
||||
early_init(0, NULL); /* Change as needed to support CRASHREPORT */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user