[iortcw] 455/497: All: Access Steam 32-bit registry key from 64-bit Windows correctly

2017-09-08 Thread Simon McVittie
This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 3b22540384a3b627b95ee631d0a0c4091ef51bda
Author: MAN-AT-ARMS 
Date:   Thu Dec 3 17:30:52 2015 -0500

All: Access Steam 32-bit registry key from 64-bit Windows correctly
---
 MP/code/sys/sys_win32.c | 10 ++
 SP/code/sys/sys_win32.c | 10 ++
 2 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/MP/code/sys/sys_win32.c b/MP/code/sys/sys_win32.c
index 2e23bc5..35a4367 100644
--- a/MP/code/sys/sys_win32.c
+++ b/MP/code/sys/sys_win32.c
@@ -146,14 +146,8 @@ char *Sys_SteamPath( void )
qboolean finishPath = qfalse;
 
 #ifdef STEAMPATH_APPID
-   if (!steamPath[0] && !RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
"SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam 
App " STEAMPATH_APPID, 0, KEY_QUERY_VALUE, &steamRegKey))
-   {
-   pathLen = MAX_OSPATH;
-   if (RegQueryValueEx(steamRegKey, "InstallLocation", NULL, NULL, 
(LPBYTE)steamPath, &pathLen))
-   steamPath[0] = '\0';
-   }
-
-   if (!steamPath[0] && !RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App " 
STEAMPATH_APPID, 0, KEY_QUERY_VALUE, &steamRegKey))
+   // Assuming Steam is a 32-bit app
+   if (!steamPath[0] && !RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App " 
STEAMPATH_APPID, 0, KEY_QUERY_VALUE | KEY_WOW64_32KEY, &steamRegKey))
{
pathLen = MAX_OSPATH;
if (RegQueryValueEx(steamRegKey, "InstallLocation", NULL, NULL, 
(LPBYTE)steamPath, &pathLen))
diff --git a/SP/code/sys/sys_win32.c b/SP/code/sys/sys_win32.c
index 6fa2994..a564970 100644
--- a/SP/code/sys/sys_win32.c
+++ b/SP/code/sys/sys_win32.c
@@ -146,14 +146,8 @@ char *Sys_SteamPath( void )
qboolean finishPath = qfalse;
 
 #ifdef STEAMPATH_APPID
-   if (!steamPath[0] && !RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
"SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam 
App " STEAMPATH_APPID, 0, KEY_QUERY_VALUE, &steamRegKey))
-   {
-   pathLen = MAX_OSPATH;
-   if (RegQueryValueEx(steamRegKey, "InstallLocation", NULL, NULL, 
(LPBYTE)steamPath, &pathLen))
-   steamPath[0] = '\0';
-   }
-
-   if (!steamPath[0] && !RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App " 
STEAMPATH_APPID, 0, KEY_QUERY_VALUE, &steamRegKey))
+   // Assuming Steam is a 32-bit app
+   if (!steamPath[0] && !RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App " 
STEAMPATH_APPID, 0, KEY_QUERY_VALUE | KEY_WOW64_32KEY, &steamRegKey))
{
pathLen = MAX_OSPATH;
if (RegQueryValueEx(steamRegKey, "InstallLocation", NULL, NULL, 
(LPBYTE)steamPath, &pathLen))

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/iortcw.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits


[iortcw] 455/497: All: Access Steam 32-bit registry key from 64-bit Windows correctly

2016-09-21 Thread Simon McVittie
This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 3b22540384a3b627b95ee631d0a0c4091ef51bda
Author: MAN-AT-ARMS 
Date:   Thu Dec 3 17:30:52 2015 -0500

All: Access Steam 32-bit registry key from 64-bit Windows correctly
---
 MP/code/sys/sys_win32.c | 10 ++
 SP/code/sys/sys_win32.c | 10 ++
 2 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/MP/code/sys/sys_win32.c b/MP/code/sys/sys_win32.c
index 2e23bc5..35a4367 100644
--- a/MP/code/sys/sys_win32.c
+++ b/MP/code/sys/sys_win32.c
@@ -146,14 +146,8 @@ char *Sys_SteamPath( void )
qboolean finishPath = qfalse;
 
 #ifdef STEAMPATH_APPID
-   if (!steamPath[0] && !RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
"SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam 
App " STEAMPATH_APPID, 0, KEY_QUERY_VALUE, &steamRegKey))
-   {
-   pathLen = MAX_OSPATH;
-   if (RegQueryValueEx(steamRegKey, "InstallLocation", NULL, NULL, 
(LPBYTE)steamPath, &pathLen))
-   steamPath[0] = '\0';
-   }
-
-   if (!steamPath[0] && !RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App " 
STEAMPATH_APPID, 0, KEY_QUERY_VALUE, &steamRegKey))
+   // Assuming Steam is a 32-bit app
+   if (!steamPath[0] && !RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App " 
STEAMPATH_APPID, 0, KEY_QUERY_VALUE | KEY_WOW64_32KEY, &steamRegKey))
{
pathLen = MAX_OSPATH;
if (RegQueryValueEx(steamRegKey, "InstallLocation", NULL, NULL, 
(LPBYTE)steamPath, &pathLen))
diff --git a/SP/code/sys/sys_win32.c b/SP/code/sys/sys_win32.c
index 6fa2994..a564970 100644
--- a/SP/code/sys/sys_win32.c
+++ b/SP/code/sys/sys_win32.c
@@ -146,14 +146,8 @@ char *Sys_SteamPath( void )
qboolean finishPath = qfalse;
 
 #ifdef STEAMPATH_APPID
-   if (!steamPath[0] && !RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
"SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam 
App " STEAMPATH_APPID, 0, KEY_QUERY_VALUE, &steamRegKey))
-   {
-   pathLen = MAX_OSPATH;
-   if (RegQueryValueEx(steamRegKey, "InstallLocation", NULL, NULL, 
(LPBYTE)steamPath, &pathLen))
-   steamPath[0] = '\0';
-   }
-
-   if (!steamPath[0] && !RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App " 
STEAMPATH_APPID, 0, KEY_QUERY_VALUE, &steamRegKey))
+   // Assuming Steam is a 32-bit app
+   if (!steamPath[0] && !RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App " 
STEAMPATH_APPID, 0, KEY_QUERY_VALUE | KEY_WOW64_32KEY, &steamRegKey))
{
pathLen = MAX_OSPATH;
if (RegQueryValueEx(steamRegKey, "InstallLocation", NULL, NULL, 
(LPBYTE)steamPath, &pathLen))

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/iortcw.git

___
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits