Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
915 B

5 years ago
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//
#include <vgui/ISystem.h>
#include <vgui_controls/Controls.h>
#define STEAM_OFFLINE_MODE "HKEY_CURRENT_USER\\Software\\Valve\\Steam\\Offline"
#define STEAM_AFS_MODE "HKEY_CURRENT_USER\\Software\\Valve\\Steam\\OfflineAFS"
#define OFFLINE_FILE "Steam\\cached\\offline_" // first part of filename
inline bool IsSteamInOfflineMode()
{
int offline = 0;
vgui::system()->GetRegistryInteger( STEAM_OFFLINE_MODE, offline );
return ( offline == 1 );
}inline bool IsSteamInAuthenticationFailSafeMode()
{
int offline = 0;
vgui::system()->GetRegistryInteger( STEAM_AFS_MODE, offline );
return ( offline == 1 );
}
inline bool IsSteamGameServerBrowsingEnabled()
{
return (IsSteamInAuthenticationFailSafeMode() || !IsSteamInOfflineMode());
}