coastline 0.0.4
Loading...
Searching...
No Matches
coastline::GameModeSession Class Reference

Optional Linux GameMode registration for the lifetime of an interactive game process. More...

#include <gamemode.h>

Public Member Functions

 GameModeSession (bool enabled)
 Load the Linux client and request GameMode immediately when enabled.
 ~GameModeSession ()
 Attempt to end a successful registration, then unload the client before SDL shuts down.
 GameModeSession (const GameModeSession &)=delete
 Prevent duplicate ownership of a GameMode registration.
GameModeSession & operator= (const GameModeSession &)=delete
 Prevent replacement of an active GameMode registration.

Detailed Description

Optional Linux GameMode registration for the lifetime of an interactive game process.

Constructor & Destructor Documentation

◆ GameModeSession() [1/2]

coastline::GameModeSession::GameModeSession ( bool enabled)
explicit

Load the Linux client and request GameMode immediately when enabled.

Missing libraries, incomplete clients, and rejected requests are logged without stopping the game. Other platforms do not load a library or request GameMode.

Parameters
enabledWhether to request GameMode. An enabled session requires SDL to remain initialised until destruction.

◆ ~GameModeSession()

coastline::GameModeSession::~GameModeSession ( )

Attempt to end a successful registration, then unload the client before SDL shuts down.

◆ GameModeSession() [2/2]

coastline::GameModeSession::GameModeSession ( const GameModeSession & )
delete

Prevent duplicate ownership of a GameMode registration.

Member Function Documentation

◆ operator=()

GameModeSession & coastline::GameModeSession::operator= ( const GameModeSession & )
delete

Prevent replacement of an active GameMode registration.


The documentation for this class was generated from the following file: