game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
steam_integration.cpp File Reference
#include "steam_integration.h"
#include "file_handle.h"
#include "logger.h"
#include "process_executor.h"
#include "steam_appinfo_parser.h"
#include "steam_constants.h"
#include "steam_paths.h"
#include "util/shell_utils.h"
#include <atomic>
#include <chrono>
#include <cstring>
#include <ctime>
#include <fcntl.h>
#include <fstream>
#include <limits>
#include <mutex>
#include <regex>
#include <set>
#include <signal.h>
#include <sstream>
#include <sys/file.h>
#include <sys/stat.h>
#include <thread>
#include <unistd.h>
#include <unordered_map>
Include dependency graph for steam_integration.cpp:

Go to the source code of this file.

Classes

class  SteamDownloadMonitor::Impl
class  SteamUpdateMonitor::Impl

Functions

static size_t findVdfSectionEnd (const std::string &content, size_t openBrace)
static std::string getActiveUserId ()
std::string getProtonVersionCommand (ProtonVersion version)
 Get command/path for Proton version.
const char * getProtonVersionName (ProtonVersion version)
 Get human-readable name for Proton version.
static size_t loadAppNamesFromLocalCache (const std::filesystem::path &steamPath)
static std::string readVdfContent (std::ifstream &file)
static std::string vdfEscapeValue (const std::string &s)

Variables

static std::unordered_map< uint32_t, std::string > s_appNameCache
static bool s_appNameCacheLoaded = false
static std::mutex s_appNameCacheMutex

Function Documentation

◆ findVdfSectionEnd()

size_t findVdfSectionEnd ( const std::string & content,
size_t openBrace )
static

◆ getActiveUserId()

◆ getProtonVersionCommand()

std::string getProtonVersionCommand ( ProtonVersion version)

Get command/path for Proton version.

Definition at line 357 of file steam_integration.cpp.

References NativeLinux, Proton8, Proton9, ProtonCachyOS, ProtonCachyOSSLR, ProtonExperimental, ProtonGE, and SystemDefault.

◆ getProtonVersionName()

const char * getProtonVersionName ( ProtonVersion version)

Get human-readable name for Proton version.

Definition at line 332 of file steam_integration.cpp.

References NativeLinux, Proton8, Proton9, ProtonCachyOS, ProtonCachyOSSLR, ProtonExperimental, ProtonGE, and SystemDefault.

◆ loadAppNamesFromLocalCache()

size_t loadAppNamesFromLocalCache ( const std::filesystem::path & steamPath)
static

Definition at line 2338 of file steam_integration.cpp.

References s_appNameCache, and Logger::warn().

Referenced by SteamLibraryScanner::loadAppNameCache().

◆ readVdfContent()

◆ vdfEscapeValue()

std::string vdfEscapeValue ( const std::string & s)
static

Variable Documentation

◆ s_appNameCache

std::unordered_map<uint32_t, std::string> s_appNameCache
static

◆ s_appNameCacheLoaded

bool s_appNameCacheLoaded = false
static

◆ s_appNameCacheMutex