Skip to content

Commit

Permalink
Make steam path optional at compile time for standalone games
Browse files Browse the repository at this point in the history
  • Loading branch information
zturtleman committed Sep 23, 2015
1 parent 750fdc0 commit 7e96fd9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions code/qcommon/q_shared.h
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/sys/sys_unix.c
Expand Up @@ -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 )
Expand Down
2 changes: 2 additions & 0 deletions code/sys/sys_win32.c
Expand Up @@ -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))
Expand All @@ -156,6 +157,7 @@ char *Sys_SteamPath( void )
Q_strcat(steamPath, MAX_OSPATH, "\\SteamApps\\common\\" STEAMPATH_NAME );
}
}
#endif

return steamPath;
}
Expand Down

0 comments on commit 7e96fd9

Please sign in to comment.