summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/d_iwad.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/d_iwad.c b/src/d_iwad.c
index 715687de..647dbbc7 100644
--- a/src/d_iwad.c
+++ b/src/d_iwad.c
@@ -100,13 +100,21 @@ typedef struct
//
// With some munging we can find where Doom was installed.
-static registry_value_t uninstall_values[] =
+// [AlexMax] From the persepctive of a 64-bit executable, 32-bit registry
+// keys are located in a different spot.
+#if _WIN64
+#define SOFTWARE_KEY "Software\\Wow6432Node"
+#else
+#define SOFTWARE_KEY "Software"
+#endif
+
+static registry_value_t uninstall_values[] =
{
// Ultimate Doom, CD version (Depths of Doom trilogy)
{
- HKEY_LOCAL_MACHINE,
- "Software\\Microsoft\\Windows\\CurrentVersion\\"
+ HKEY_LOCAL_MACHINE,
+ SOFTWARE_KEY "\\Microsoft\\Windows\\CurrentVersion\\"
"Uninstall\\Ultimate Doom for Windows 95",
"UninstallString",
},
@@ -114,8 +122,8 @@ static registry_value_t uninstall_values[] =
// Doom II, CD version (Depths of Doom trilogy)
{
- HKEY_LOCAL_MACHINE,
- "Software\\Microsoft\\Windows\\CurrentVersion\\"
+ HKEY_LOCAL_MACHINE,
+ SOFTWARE_KEY "\\Microsoft\\Windows\\CurrentVersion\\"
"Uninstall\\Doom II for Windows 95",
"UninstallString",
},
@@ -123,8 +131,8 @@ static registry_value_t uninstall_values[] =
// Final Doom
{
- HKEY_LOCAL_MACHINE,
- "Software\\Microsoft\\Windows\\CurrentVersion\\"
+ HKEY_LOCAL_MACHINE,
+ SOFTWARE_KEY "\\Microsoft\\Windows\\CurrentVersion\\"
"Uninstall\\Final Doom for Windows 95",
"UninstallString",
},
@@ -132,8 +140,8 @@ static registry_value_t uninstall_values[] =
// Shareware version
{
- HKEY_LOCAL_MACHINE,
- "Software\\Microsoft\\Windows\\CurrentVersion\\"
+ HKEY_LOCAL_MACHINE,
+ SOFTWARE_KEY "\\Microsoft\\Windows\\CurrentVersion\\"
"Uninstall\\Doom Shareware for Windows 95",
"UninstallString",
},
@@ -144,7 +152,7 @@ static registry_value_t uninstall_values[] =
static registry_value_t collectors_edition_value =
{
HKEY_LOCAL_MACHINE,
- "Software\\Activision\\DOOM Collector's Edition\\v1.0",
+ SOFTWARE_KEY "\\Activision\\DOOM Collector's Edition\\v1.0",
"INSTALLPATH",
};
@@ -162,7 +170,7 @@ static char *collectors_edition_subdirs[] =
static registry_value_t steam_install_location =
{
HKEY_LOCAL_MACHINE,
- "Software\\Valve\\Steam",
+ SOFTWARE_KEY "\\Valve\\Steam",
"InstallPath",
};