Game related utilities.
More...
#include <GameUtils.h>
|
static bool | FillInGameClient (CFileItem &item, std::string &savestatePath) |
| Set the game client property, prompt the user for a savestate if there are any (savestates store the information of which game client created it). If there are no savestates or the user wants a new savestate, prompt the user for a game client.
|
|
static bool | HasGameExtension (const std::string &path) |
| Check if the file extension is supported by an add-on in a local or remote repository.
|
|
static std::set< std::string > | GetGameExtensions () |
| Get all game extensions.
|
|
static bool | IsStandaloneGame (const ADDON::AddonPtr &addon) |
| Check if game script or game add-on can be launched directly.
|
|
◆ FillInGameClient()
bool CGameUtils::FillInGameClient |
( |
CFileItem & | item, |
|
|
std::string & | savestatePath ) |
|
static |
Set the game client property, prompt the user for a savestate if there are any (savestates store the information of which game client created it). If there are no savestates or the user wants a new savestate, prompt the user for a game client.
- Parameters
-
item | The item with or without a game client in its info tag |
savestatePath | Output. The path to the savestate selected. Empty if new savestate was selected |
- Returns
- True if the item has a valid game client ID in its info tag
◆ GetGameExtensions()
std::set< std::string > CGameUtils::GetGameExtensions |
( |
| ) |
|
|
static |
◆ HasGameExtension()
bool CGameUtils::HasGameExtension |
( |
const std::string & | path | ) |
|
|
static |
Check if the file extension is supported by an add-on in a local or remote repository.
- Parameters
-
path | The path of the game file |
- Returns
- true if the path's extension is supported by a known game client
◆ IsStandaloneGame()
Check if game script or game add-on can be launched directly.
- Returns
- true if the add-on can be launched, false otherwise
The documentation for this class was generated from the following files: