hl2_src-leak-2017/src/public/OfflineMode.h
BotoX 60f625f414 import hl2_src from full.7z
source: magnet:?xt=urn:btih:21DDA6847DDE983F2F8063739249D2D1D09A5DDA
2020-12-25 16:26:23 +01:00

30 lines
915 B
C

//========= 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());
}