From 04713a040660355e962f562d3bc9518344e2f299 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Tue, 18 Mar 2003 10:23:10 +0000 Subject: [PATCH] win32 clear registry Clear the registry settings via nethack -clearreg --- sys/share/pcmain.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index be6b4e389..8ccec94b6 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -59,6 +59,10 @@ extern void FDECL(nethack_exit,(int)); #define nethack_exit exit #endif +#if defined(MSWIN_GRAPHICS) +extern void NDECL(mswin_destroy_reg); +#endif + #ifdef EXEPATH STATIC_DCL char *FDECL(exepath,(char *)); #endif @@ -236,7 +240,13 @@ char *argv[]; #endif /*MSWIN_GRAPHICS*/ nethack_exit(EXIT_SUCCESS); } - + +#ifdef MSWIN_GRAPHICS + if (!strncmpi(argv[1], "-clearreg", 6)) { /* clear registry */ + mswin_destroy_reg(); + nethack_exit(EXIT_SUCCESS); + } +#endif /* Don't initialize the window system just to print usage */ if (!strncmp(argv[1], "-?", 2) || !strncmp(argv[1], "/?", 2)) { nhusage();