From f44ecaa4f27e7538ddcad66d40e543bffa2d2d86 Mon Sep 17 00:00:00 2001 From: manuel Date: Sun, 4 Jun 2017 16:57:49 +0200 Subject: sync with upstream --- .../include/kodi/kodi_game_dll.h | 72 ++++++++-------------- 1 file changed, 25 insertions(+), 47 deletions(-) (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h') diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h index 247f24b..4ce5bbc 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2016 Team Kodi + * Copyright (C) 2014-2017 Team Kodi * http://kodi.tv * * This Program is free software; you can redistribute it and/or modify @@ -26,28 +26,6 @@ extern "C" { #endif -// --- Game API operations ----------------------------------------------------- - -/*! - * \brief Return GAME_API_VERSION_STRING - * - * The add-on is backwards compatible with the frontend if this API version is - * is at least the frontend's minimum API version. - * - * \return Must be GAME_API_VERSION_STRING - */ -const char* GetGameAPIVersion(void); - -/*! - * \brief Return GAME_MIN_API_VERSION_STRING - * - * The add-on is forwards compatible with the frontend if this minimum version - * is no more than the frontend's API version. - * - * \return Must be GAME_MIN_API_VERSION_STRING - */ -const char* GetMininumGameAPIVersion(void); - // --- Game operations --------------------------------------------------------- /*! @@ -233,7 +211,7 @@ GAME_ERROR CheatReset(void); * * \return the error, or GAME_ERROR_NO_ERROR if data was set to a valid buffer */ -GAME_ERROR GetMemory(GAME_MEMORY type, const uint8_t** data, size_t* size); +GAME_ERROR GetMemory(GAME_MEMORY type, uint8_t** data, size_t* size); /*! * \brief Set a cheat code @@ -254,30 +232,30 @@ GAME_ERROR SetCheat(unsigned int index, bool enabled, const char* code); * Note that get_addon() is defined here, so it will be available in all * compiled game clients. */ -void __declspec(dllexport) get_addon(GameClient* pClient) +void __declspec(dllexport) get_addon(void* ptr) { - pClient->GetGameAPIVersion = GetGameAPIVersion; - pClient->GetMininumGameAPIVersion = GetMininumGameAPIVersion; - pClient->LoadGame = LoadGame; - pClient->LoadGameSpecial = LoadGameSpecial; - pClient->LoadStandalone = LoadStandalone; - pClient->UnloadGame = UnloadGame; - pClient->GetGameInfo = GetGameInfo; - pClient->GetRegion = GetRegion; - pClient->RequiresGameLoop = RequiresGameLoop; - pClient->RunFrame = RunFrame; - pClient->Reset = Reset; - pClient->HwContextReset = HwContextReset; - pClient->HwContextDestroy = HwContextDestroy; - pClient->UpdatePort = UpdatePort; - pClient->HasFeature = HasFeature; - pClient->InputEvent = InputEvent; - pClient->SerializeSize = SerializeSize; - pClient->Serialize = Serialize; - pClient->Deserialize = Deserialize; - pClient->CheatReset = CheatReset; - pClient->GetMemory = GetMemory; - pClient->SetCheat = SetCheat; + AddonInstance_Game* pClient = static_cast(ptr); + + pClient->toAddon.LoadGame = LoadGame; + pClient->toAddon.LoadGameSpecial = LoadGameSpecial; + pClient->toAddon.LoadStandalone = LoadStandalone; + pClient->toAddon.UnloadGame = UnloadGame; + pClient->toAddon.GetGameInfo = GetGameInfo; + pClient->toAddon.GetRegion = GetRegion; + pClient->toAddon.RequiresGameLoop = RequiresGameLoop; + pClient->toAddon.RunFrame = RunFrame; + pClient->toAddon.Reset = Reset; + pClient->toAddon.HwContextReset = HwContextReset; + pClient->toAddon.HwContextDestroy = HwContextDestroy; + pClient->toAddon.UpdatePort = UpdatePort; + pClient->toAddon.HasFeature = HasFeature; + pClient->toAddon.InputEvent = InputEvent; + pClient->toAddon.SerializeSize = SerializeSize; + pClient->toAddon.Serialize = Serialize; + pClient->toAddon.Deserialize = Deserialize; + pClient->toAddon.CheatReset = CheatReset; + pClient->toAddon.GetMemory = GetMemory; + pClient->toAddon.SetCheat = SetCheat; } #ifdef __cplusplus -- cgit v1.2.3