|
game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
|
Manages system-level game session state (screensaver, power profile). More...
#include <game_session_service.h>
Public Member Functions | |
| GameSessionService (const GameSessionService &)=delete | |
| int | activeGameCount () const |
| Get current number of running games being tracked. | |
| bool | isActive () const |
| Check if any inhibitions are currently active. | |
| void | onGameStarted () |
| Called when a game starts running. | |
| void | onGameStopped () |
| Called when a game stops running. | |
| GameSessionService & | operator= (const GameSessionService &)=delete |
Static Public Member Functions | |
| static GameSessionService & | instance () |
| Get singleton instance. | |
Manages system-level game session state (screensaver, power profile).
Singleton service that inhibits screensaver and switches power profile when games are running. Uses reference counting to handle multiple simultaneous game sessions.
Definition at line 39 of file game_session_service.h.
|
delete |
References GameSessionService().
Referenced by GameSessionService(), instance(), and operator=().
| int GameSessionService::activeGameCount | ( | ) | const |
Get current number of running games being tracked.
Definition at line 102 of file game_session_service.cpp.
|
static |
Get singleton instance.
Definition at line 21 of file game_session_service.cpp.
References GameSessionService(), and instance().
Referenced by instance(), GameProcessManager::launchGame(), GameProcessManager::stopGame(), core::LaunchController::update(), and GameProcessManager::update().
| bool GameSessionService::isActive | ( | ) | const |
Check if any inhibitions are currently active.
Definition at line 96 of file game_session_service.cpp.
| void GameSessionService::onGameStarted | ( | ) |
Called when a game starts running.
On first game start:
Uses reference counting for multiple simultaneous games.
Definition at line 55 of file game_session_service.cpp.
References Logger::info().
Referenced by GameProcessManager::launchGame(), and core::LaunchController::update().
| void GameSessionService::onGameStopped | ( | ) |
Called when a game stops running.
When last game stops:
Definition at line 73 of file game_session_service.cpp.
References Logger::info(), and Logger::warn().
Referenced by GameProcessManager::stopGame(), core::LaunchController::update(), and GameProcessManager::update().
|
delete |
References GameSessionService().