|
game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
|
Play statistics and usage tracking for a game. More...
#include <game.h>
Public Member Functions | |
| GameStatistics () | |
| Constructor with defaults. | |
Public Attributes | |
| int | crashCount |
| Number of times game has crashed. | |
| time_t | dateAdded |
| Unix timestamp when added to library. | |
| time_t | dateInstalled |
| Unix timestamp when installed. | |
| std::map< std::string, std::string > | lastEnvironmentVars |
| Environment variables from last launch. | |
| std::string | lastExitReason |
| Reason game stopped: "normal", "crash", "timeout", "unknown". | |
| time_t | lastExitTime |
| Unix timestamp of last exit. | |
| std::string | lastLaunchCommand |
| Full command used for last launch (with env vars). | |
| time_t | lastPlayed |
| Unix timestamp of last play session. | |
| std::string | lastProtonVersion |
| Proton version used in last launch. | |
| int | timesLaunched |
| Number of times game was launched. | |
| double | totalPlayTimeSeconds |
| Total play time in seconds (for all sessions). | |
Play statistics and usage tracking for a game.
Tracks how often and how long a game has been played, as well as important dates (when added, when installed, when last played). This data is used for "Recently Played" and "Most Played" features.
|
inline |
Constructor with defaults.
Initializes all counters and timestamps to zero.
Definition at line 735 of file game.h.
References crashCount, dateAdded, dateInstalled, lastExitTime, lastPlayed, timesLaunched, and totalPlayTimeSeconds.
| int GameStatistics::crashCount |
Number of times game has crashed.
Definition at line 728 of file game.h.
Referenced by GameStatistics(), GameDatabase::insertGame(), and DetailsPanelManager::Impl::update().
| time_t GameStatistics::dateAdded |
Unix timestamp when added to library.
Definition at line 716 of file game.h.
Referenced by GameStatistics(), GameLibrary::addGame(), GameDatabase::insertGame(), and core::GameLibraryController::Impl::sortGames().
| time_t GameStatistics::dateInstalled |
Unix timestamp when installed.
Definition at line 717 of file game.h.
Referenced by GameStatistics(), and GameDatabase::insertGame().
| std::map<std::string, std::string> GameStatistics::lastEnvironmentVars |
Environment variables from last launch.
Definition at line 723 of file game.h.
Referenced by GameDatabase::getSchemaVersion(), GameDatabase::insertGame(), and GameProcessManager::launchGame().
| std::string GameStatistics::lastExitReason |
Reason game stopped: "normal", "crash", "timeout", "unknown".
Definition at line 726 of file game.h.
Referenced by GameDatabase::insertGame().
| time_t GameStatistics::lastExitTime |
Unix timestamp of last exit.
Definition at line 727 of file game.h.
Referenced by GameStatistics(), and GameDatabase::insertGame().
| std::string GameStatistics::lastLaunchCommand |
Full command used for last launch (with env vars).
Definition at line 720 of file game.h.
Referenced by GameDatabase::insertGame(), and GameProcessManager::launchGame().
| time_t GameStatistics::lastPlayed |
Unix timestamp of last play session.
Definition at line 715 of file game.h.
Referenced by GameStatistics(), GameDatabase::insertGame(), core::GameLibraryController::Impl::sortGames(), GameProcessManager::stopGame(), SteamGame::toGame(), DetailsPanelManager::Impl::update(), and GameProcessManager::update().
| std::string GameStatistics::lastProtonVersion |
Proton version used in last launch.
Definition at line 721 of file game.h.
Referenced by GameDatabase::insertGame(), and GameProcessManager::launchGame().
| int GameStatistics::timesLaunched |
Number of times game was launched.
Definition at line 713 of file game.h.
Referenced by GameStatistics(), GameDatabase::insertGame(), GameProcessManager::launchGame(), and DetailsPanelManager::Impl::update().
| double GameStatistics::totalPlayTimeSeconds |
Total play time in seconds (for all sessions).
Definition at line 714 of file game.h.
Referenced by GameStatistics(), GameDatabase::insertGame(), core::GameLibraryController::Impl::sortGames(), GameProcessManager::stopGame(), SteamGame::toGame(), DetailsPanelManager::Impl::update(), and GameProcessManager::update().