From 052741d3485780d8e029ada086e330fdd56ee7ac Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 23 Dec 2006 21:24:56 +0000 Subject: Add '-findiwads' command line hack so that the setup program can find out what games are installed. Provide a drop-down list in setup to allow the game type to be selected. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 803 --- src/d_iwad.c | 48 +++++++++++++++++++++++++++++++++++------------- src/d_iwad.h | 1 + src/d_main.c | 5 +++++ 3 files changed, 41 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/d_iwad.c b/src/d_iwad.c index 04774203..612f2434 100644 --- a/src/d_iwad.c +++ b/src/d_iwad.c @@ -170,12 +170,12 @@ static char *GetRegistryString(registry_value_t *reg_val) // Allocate a buffer for the value and read the value - result = Z_Malloc(len, PU_STATIC, 0); + result = malloc(len); if (RegQueryValueEx(key, reg_val->value, NULL, &valtype, (unsigned char *) result, &len) != ERROR_SUCCESS) { - Z_Free(result); + free(result); return NULL; } @@ -209,7 +209,7 @@ static void CheckUninstallStrings(void) if (unstr == NULL) { - Z_Free(val); + free(val); } else { @@ -238,17 +238,16 @@ static void CheckCollectorsEdition(void) for (i=0; i 0) + { + D_FindInstalledIWADs(); + } + // print banner PrintBanner(PACKAGE_STRING); -- cgit v1.2.3