|
game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
|
Actual environment and command line read from a running process. More...
#include <game.h>
Public Member Functions | |
| std::vector< std::string > | compareWithConfigured (const std::vector< std::string > &configured) const |
| Compare configured vs actual environment. | |
| std::map< std::string, std::string > | getKeyEnvironment () const |
| Get only gaming-related environment variables. | |
Static Public Member Functions | |
| static const std::vector< std::string > & | getKeyEnvVars () |
| static ActualRuntimeInfo | readFromProcess (int processId) |
| Read actual runtime info from a process. | |
Public Attributes | |
| std::string | commandLine |
| Full command line from /proc/pid/cmdline. | |
| std::map< std::string, std::string > | envVars |
| All environment variables. | |
| int | pid = -1 |
| Process ID this info was read from. | |
| bool | valid = false |
| Whether the read was successful. | |
Actual environment and command line read from a running process.
This struct captures the REAL runtime environment of a game process by reading from /proc/{pid}/environ and /proc/{pid}/cmdline. This serves as a "sanity check" to verify what was actually applied vs what was configured.
| std::vector< std::string > ActualRuntimeInfo::compareWithConfigured | ( | const std::vector< std::string > & | configured | ) | const |
Compare configured vs actual environment.
| configured | Expected environment variables (key=value strings) |
Definition at line 1085 of file game.cpp.
References envVars, and getKeyEnvVars().
Referenced by DetailsPanelManager::Impl::update().
| std::map< std::string, std::string > ActualRuntimeInfo::getKeyEnvironment | ( | ) | const |
Get only gaming-related environment variables.
Definition at line 1067 of file game.cpp.
References envVars, and getKeyEnvVars().
Referenced by DetailsPanelManager::Impl::update().
|
inlinestatic |
Definition at line 386 of file game.h.
Referenced by compareWithConfigured(), and getKeyEnvironment().
|
static |
Read actual runtime info from a process.
| processId | PID to read from |
Definition at line 999 of file game.cpp.
References commandLine, envVars, pid, and valid.
Referenced by DetailsPanelManager::Impl::update().
| std::string ActualRuntimeInfo::commandLine |
Full command line from /proc/pid/cmdline.
Definition at line 381 of file game.h.
Referenced by readFromProcess(), and DetailsPanelManager::Impl::update().
| std::map<std::string, std::string> ActualRuntimeInfo::envVars |
All environment variables.
Definition at line 382 of file game.h.
Referenced by compareWithConfigured(), getKeyEnvironment(), and readFromProcess().
| int ActualRuntimeInfo::pid = -1 |
Process ID this info was read from.
Definition at line 380 of file game.h.
Referenced by readFromProcess().
| bool ActualRuntimeInfo::valid = false |
Whether the read was successful.
Definition at line 383 of file game.h.
Referenced by readFromProcess(), and DetailsPanelManager::Impl::update().