game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
game_process.cpp File Reference
#include "game_process.h"
#include "controllers/settings_controller.h"
#include "file_handle.h"
#include "frame_metrics.h"
#include "game_session_service.h"
#include "logger.h"
#include "process_executor.h"
#include "proton_cache.h"
#include "shell_utils.h"
#include "steam_constants.h"
#include "system_info_service.h"
#include <algorithm>
#include <chrono>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <limits>
#include <set>
#include <sstream>
#include <thread>
#include <cctype>
#include <cerrno>
#include <dirent.h>
#include <dlfcn.h>
#include <signal.h>
#include <sys/utsname.h>
#include <sys/wait.h>
#include <unistd.h>
#include <utility>
Include dependency graph for game_process.cpp:

Go to the source code of this file.

Classes

class  anonymous_namespace{game_process.cpp}::GameModeAPI

Namespaces

namespace  anonymous_namespace{game_process.cpp}

Functions

void anonymous_namespace{game_process.cpp}::addApplicationSpecificFixes (std::ostringstream &cmd, const Game &game)
 Add application-specific environment variables for known problematic apps.
void anonymous_namespace{game_process.cpp}::addGPUOptimizations (std::ostringstream &cmd, bool isProton=false)
 Add GPU-specific optimization environment variables.
void anonymous_namespace{game_process.cpp}::addSyncEnvironment (std::ostringstream &cmd, const GameRunnerConfig &config, bool isProton=false)
 Add synchronization environment variables.
std::string anonymous_namespace{game_process.cpp}::buildGamescopeWrapper (const GameRunnerConfig &config, std::string &modeInfo)
 Build the Gamescope wrapper prefix.
std::string anonymous_namespace{game_process.cpp}::buildWrapperChain (const GameRunnerConfig &config, const std::string &gameId)
 Build the wrapper chain for a game launch.
std::string anonymous_namespace{game_process.cpp}::detectGPUVendor ()
 Detect GPU vendor for GPU-specific optimizations.
time_t anonymous_namespace{game_process.cpp}::getProcessStartTimeFromProc (int pid)
static std::string getSteamCommand ()
static bool isSteamFlatpak ()
bool anonymous_namespace{game_process.cpp}::isWrapperAvailable (const std::string &name)
 Check if a wrapper/tool is available in PATH.
bool anonymous_namespace{game_process.cpp}::kernelSupportsFsync ()
 Check if kernel supports Fsync (futex2).
bool anonymous_namespace{game_process.cpp}::kernelSupportsNTSync ()
 Check if kernel supports NTSync (kernel 6.14+ or CachyOS backport).
const std::vector< std::string > & anonymous_namespace{game_process.cpp}::kWineSystemExes ()
static time_t parseProcessStartTime (pid_t pid)

Function Documentation

◆ getSteamCommand()

std::string getSteamCommand ( )
static

Definition at line 267 of file game_process.cpp.

References isSteamFlatpak().

◆ isSteamFlatpak()

bool isSteamFlatpak ( )
static

Definition at line 246 of file game_process.cpp.

References ProcessExecutor::executeWithOutput().

Referenced by getSteamCommand().

◆ parseProcessStartTime()

time_t parseProcessStartTime ( pid_t pid)
static

Definition at line 185 of file game_process.cpp.

Referenced by GameProcess::attachToRunningProcess().