From 1a256f250963ee2f1fd663555f33a2aa4c2913d3 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 15 Oct 2017 23:10:03 +0000 Subject: [PATCH] Duke: Scan for *.dat in addition to .grp, .zip, .ssi, etc. git-svn-id: https://svn.eduke32.com/eduke32@6476 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/grpscan.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/source/duke3d/src/grpscan.cpp b/source/duke3d/src/grpscan.cpp index 798032593..fca87afd0 100644 --- a/source/duke3d/src/grpscan.cpp +++ b/source/duke3d/src/grpscan.cpp @@ -440,7 +440,6 @@ static void ProcessGroups(CACHE1D_FIND_REC *srch) int32_t ScanGroups(void) { - CACHE1D_FIND_REC *srch; struct grpcache *fg, *fgg; initprintf("Searching for game data...\n"); @@ -448,13 +447,19 @@ int32_t ScanGroups(void) LoadGameList(); LoadGroupsCache(); - srch = klistpath("/", "*.grp", CACHE1D_FIND_FILE); - ProcessGroups(srch); - klistfree(srch); + static char const *extensions[] = + { + "*.grp", + "*.ssi", + "*.dat", + }; - srch = klistpath("/", "*.ssi", CACHE1D_FIND_FILE); - ProcessGroups(srch); - klistfree(srch); + for (char const *extension : extensions) + { + CACHE1D_FIND_REC *srch = klistpath("/", extension, CACHE1D_FIND_FILE); + ProcessGroups(srch); + klistfree(srch); + } FreeGroupsCache();