From 7e96fd9cb641cf841f38aece0c4187afc295224c Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Tue, 22 Sep 2015 19:25:16 -0500 Subject: [PATCH] Make steam path optional at compile time for standalone games --- code/qcommon/q_shared.h | 4 ++-- code/sys/sys_unix.c | 2 +- code/sys/sys_win32.c | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h index 024d4128..8f82348f 100644 --- a/code/qcommon/q_shared.h +++ b/code/qcommon/q_shared.h @@ -33,8 +33,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define CLIENT_WINDOW_MIN_TITLE "changeme2" #define HOMEPATH_NAME_UNIX ".foo" #define HOMEPATH_NAME_WIN "FooBar" - #define STEAMPATH_NAME "Foo Bar" #define HOMEPATH_NAME_MACOSX HOMEPATH_NAME_WIN +// #define STEAMPATH_NAME "Foo Bar" #define GAMENAME_FOR_MASTER "foobar" // must NOT contain whitespace // #define LEGACY_PROTOCOL // You probably don't need this for your standalone game #else @@ -44,8 +44,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define CLIENT_WINDOW_MIN_TITLE "ioq3" #define HOMEPATH_NAME_UNIX ".q3a" #define HOMEPATH_NAME_WIN "Quake3" - #define STEAMPATH_NAME "Quake 3 Arena" #define HOMEPATH_NAME_MACOSX HOMEPATH_NAME_WIN + #define STEAMPATH_NAME "Quake 3 Arena" #define GAMENAME_FOR_MASTER "Quake3Arena" #define LEGACY_PROTOCOL #endif diff --git a/code/sys/sys_unix.c b/code/sys/sys_unix.c index 5f7c76b1..cf980eba 100644 --- a/code/sys/sys_unix.c +++ b/code/sys/sys_unix.c @@ -89,7 +89,7 @@ Sys_SteamPath char *Sys_SteamPath( void ) { // Disabled since Steam doesn't let you install Quake 3 on Mac/Linux -#if 0 +#if 0 //#ifdef STEAMPATH_NAME char *p; if( ( p = getenv( "HOME" ) ) != NULL ) diff --git a/code/sys/sys_win32.c b/code/sys/sys_win32.c index f4e41d5d..4c08ef7a 100644 --- a/code/sys/sys_win32.c +++ b/code/sys/sys_win32.c @@ -136,6 +136,7 @@ Sys_SteamPath */ char *Sys_SteamPath( void ) { +#ifdef STEAMPATH_NAME HKEY steamRegKey; if (!RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Valve\\Steam", 0, KEY_QUERY_VALUE, &steamRegKey)) @@ -156,6 +157,7 @@ char *Sys_SteamPath( void ) Q_strcat(steamPath, MAX_OSPATH, "\\SteamApps\\common\\" STEAMPATH_NAME ); } } +#endif return steamPath; }