Kodi Docs 20.0
Kodi is an open source media player and entertainment hub.
kodi::addon::CInstanceGame Class Reference

#include <Game.h>

Inheritance diagram for kodi::addon::CInstanceGame:
kodi::addon::IAddonInstance

Classes

class  CStream
 

Public Member Functions

 CInstanceGame ()
 Game class constructor. More...
 
 ~CInstanceGame () override=default
 Destructor. More...
 
std::string GameClientDllPath () const
 Callback to Kodi Function
The path of the game client being loaded. More...
 
bool ProxyDllPaths (std::vector< std::string > &paths)
 Callback to Kodi Function
Paths to proxy DLLs used to load the game client. More...
 
bool ResourceDirectories (std::vector< std::string > &dirs)
 Callback to Kodi Function
The "system" directories of the frontend. More...
 
std::string ProfileDirectory () const
 Callback to Kodi Function
The writable directory of the frontend. More...
 
bool SupportsVFS () const
 Callback to Kodi Function
The value of the <supports_vfs> property from addon.xml. More...
 
bool Extensions (std::vector< std::string > &extensions)
 Callback to Kodi Function
The extensions in the <extensions> property from addon.xml. More...
 
virtual GAME_ERROR LoadGame (const std::string &url)
 Load a game. More...
 
virtual GAME_ERROR LoadGameSpecial (SPECIAL_GAME_TYPE type, const std::vector< std::string > &urls)
 Load a game that requires multiple files. More...
 
virtual GAME_ERROR LoadStandalone ()
 Begin playing without a game file. More...
 
virtual GAME_ERROR UnloadGame ()
 Unload the current game. More...
 
virtual GAME_ERROR GetGameTiming (game_system_timing &timing_info)
 Get timing information about the loaded game. More...
 
virtual GAME_REGION GetRegion ()
 Get region of the loaded game. More...
 
virtual bool RequiresGameLoop ()
 Return true if the client requires the frontend to provide a game loop. More...
 
virtual GAME_ERROR RunFrame ()
 Run a single frame for add-ons that use a game loop. More...
 
virtual GAME_ERROR Reset ()
 Reset the current game. More...
 
void CloseGame (void)
 Callback to Kodi Function
Requests the frontend to stop the current game More...
 
virtual GAME_ERROR HwContextReset ()
 Invalidates the current HW context and reinitializes GPU resources. More...
 
virtual GAME_ERROR HwContextDestroy ()
 Called before the context is destroyed. More...
 
game_proc_address_t HwGetProcAddress (const char *sym)
 Callback to Kodi Function
Get a symbol from the hardware context More...
 
virtual bool HasFeature (const std::string &controller_id, const std::string &feature_name)
 Check if input is accepted for a feature on the controller. More...
 
virtual game_input_topologyGetTopology ()
 Get the input topology that specifies which controllers can be connected. More...
 
virtual void FreeTopology (game_input_topology *topology)
 Free the topology's resources. More...
 
virtual void SetControllerLayouts (const std::vector< kodi::addon::GameControllerLayout > &controllers)
 Set the layouts for known controllers. More...
 
virtual bool EnableKeyboard (bool enable, const std::string &controller_id)
 Enable/disable keyboard input using the specified controller. More...
 
virtual bool EnableMouse (bool enable, const std::string &controller_id)
 Enable/disable mouse input using the specified controller. More...
 
virtual bool ConnectController (bool connect, const std::string &port_address, const std::string &controller_id)
 Connect/disconnect a controller to a port on the virtual game console. More...
 
virtual bool InputEvent (const game_input_event &event)
 Notify the add-on of an input event. More...
 
bool KodiInputEvent (const game_input_event &event)
 Callback to Kodi Function
Notify the port of an input event More...
 
virtual size_t SerializeSize ()
 Get the number of bytes required to serialize the game. More...
 
virtual GAME_ERROR Serialize (uint8_t *data, size_t size)
 Serialize the state of the game. More...
 
virtual GAME_ERROR Deserialize (const uint8_t *data, size_t size)
 Deserialize the game from the given state. More...
 
virtual GAME_ERROR CheatReset ()
 Reset the cheat system. More...
 
virtual GAME_ERROR GetMemory (GAME_MEMORY type, uint8_t *&data, size_t &size)
 Get a region of memory. More...
 
virtual GAME_ERROR SetCheat (unsigned int index, bool enabled, const std::string &code)
 Set a cheat code. More...
 
- Public Member Functions inherited from kodi::addon::IAddonInstance
 IAddonInstance (ADDON_TYPE type, const std::string &version)
 
virtual ~IAddonInstance ()=default
 
virtual ADDON_STATUS CreateInstance (int instanceType, const std::string &instanceID, KODI_HANDLE instance, const std::string &version, KODI_HANDLE &addonInstance)
 

Additional Inherited Members

- Public Attributes inherited from kodi::addon::IAddonInstance
const ADDON_TYPE m_type
 
const std::string m_kodiVersion
 
std::string m_id
 

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