coastline 0.0.4
Loading...
Searching...
No Matches
gamemode.h
Go to the documentation of this file.
1#ifndef COASTLINE_GAMEMODE_H
2#define COASTLINE_GAMEMODE_H
3
4#include <SDL3/SDL_loadso.h>
5
6namespace coastline {
7
10public:
18 explicit GameModeSession(bool enabled);
25
26private:
27#if defined(__linux__)
28 SDL_SharedObject *m_library = nullptr;
29 int (*m_end)() = nullptr;
30 const char *(*m_error)() = nullptr;
31 bool m_active = false;
32#endif
33};
34
35} // namespace coastline
36
37#endif
~GameModeSession()
Attempt to end a successful registration, then unload the client before SDL shuts down.
GameModeSession(bool enabled)
Load the Linux client and request GameMode immediately when enabled.
GameModeSession & operator=(const GameModeSession &)=delete
Prevent replacement of an active GameMode registration.
GameModeSession(const GameModeSession &)=delete
Prevent duplicate ownership of a GameMode registration.
Definition assetimport.h:11