diff options
Diffstat (limited to '0001-Fix-wrong-Freedoom-IWAD-detection-fixes-7.patch')
-rw-r--r-- | 0001-Fix-wrong-Freedoom-IWAD-detection-fixes-7.patch | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/0001-Fix-wrong-Freedoom-IWAD-detection-fixes-7.patch b/0001-Fix-wrong-Freedoom-IWAD-detection-fixes-7.patch new file mode 100644 index 000000000000..6ff00dfdaafc --- /dev/null +++ b/0001-Fix-wrong-Freedoom-IWAD-detection-fixes-7.patch @@ -0,0 +1,73 @@ +From 2dabf254717a54dea6db4dbdbac3f5ea7b6aa171 Mon Sep 17 00:00:00 2001 +From: Max Waine <bobishmax@hotmail.com> +Date: Wed, 28 Sep 2016 16:14:22 +0100 +Subject: [PATCH] Fix wrong Freedoom IWAD detection (fixes #7) + +--- + source/d_findiwads.cpp | 8 +++++++- + source/d_iwad.cpp | 3 +++ + source/d_iwad.h | 1 + + 3 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/source/d_findiwads.cpp b/source/d_findiwads.cpp +index 765e5fb..bb9ec64 100644 +--- a/source/d_findiwads.cpp ++++ b/source/d_findiwads.cpp +@@ -491,6 +491,7 @@ static void D_determineIWADVersion(const qstring &fullpath) + version.gamemission = none; + version.hassecrets = false; + version.freedoom = false; ++ version.freedm = false; + version.bfgedition = false; + version.error = false; + version.flags = IWADF_NOERRORS; +@@ -524,7 +525,12 @@ static void D_determineIWADVersion(const qstring &fullpath) + case commercial: // DOOM II + if(version.freedoom) + { +- if(PATHEMPTY(gi_path_fdoom)) // FreeDoom ++ if(version.freedm) ++ { ++ if(PATHEMPTY(gi_path_freedm)) // FreeDM ++ var = &gi_path_freedm; ++ } ++ else if(PATHEMPTY(gi_path_fdoom)) // FreeDoom + var = &gi_path_fdoom; + } + else +diff --git a/source/d_iwad.cpp b/source/d_iwad.cpp +index ef20c30..85ca49a 100644 +--- a/source/d_iwad.cpp ++++ b/source/d_iwad.cpp +@@ -860,6 +860,8 @@ void D_CheckIWAD(const char *iwadname, iwadcheck_t &version) + ++sosr; + else if(!lumpnamecmp(n, "FREEDOOM")) + version.freedoom = true; ++ else if(!lumpnamecmp(n, "FREEDM")) // Needed to discern freedm from freedoom2 ++ version.freedm = true; + else if(!lumpnamecmp(n, "HACX-R")) + ++hacx; + else if(!lumpnamecmp(n, "M_ACPT" ) || // haleyjd 11/03/12: BFG Edition +@@ -1369,6 +1371,7 @@ static void D_identifyIWAD() + version.gamemission = none; + version.hassecrets = false; + version.freedoom = false; ++ version.freedm = false; + version.bfgedition = false; + version.error = false; + version.flags = IWADF_FATALNOTOPEN | IWADF_FATALNOTWAD; +diff --git a/source/d_iwad.h b/source/d_iwad.h +index f50ca5c..38e8538 100644 +--- a/source/d_iwad.h ++++ b/source/d_iwad.h +@@ -55,6 +55,7 @@ struct iwadcheck_t + GameMission_t gamemission; + bool hassecrets; + bool freedoom; ++ bool freedm; + bool bfgedition; + }; + +-- +2.10.0 + |