diff options
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h')
| -rw-r--r-- | xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h | 28 |
1 files changed, 20 insertions, 8 deletions
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 478f81b..4338606 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 | |||
| @@ -153,31 +153,42 @@ game_input_topology* GetTopology(); | |||
| 153 | void FreeTopology(game_input_topology* topology); | 153 | void FreeTopology(game_input_topology* topology); |
| 154 | 154 | ||
| 155 | /*! | 155 | /*! |
| 156 | * \brief Set the layouts for known controllers | ||
| 157 | * | ||
| 158 | * \param controllers The controller layouts | ||
| 159 | * \param controller_count The number of items in the array | ||
| 160 | * | ||
| 161 | * After loading the input topology, the frontend will call this with | ||
| 162 | * controller layouts for all controllers discovered in the topology. | ||
| 163 | */ | ||
| 164 | void SetControllerLayouts(const game_controller_layout* controllers, unsigned int controller_count); | ||
| 165 | |||
| 166 | /*! | ||
| 156 | * \brief Enable/disable keyboard input using the specified controller | 167 | * \brief Enable/disable keyboard input using the specified controller |
| 157 | * | 168 | * |
| 158 | * \param enable True to enable input, false otherwise | 169 | * \param enable True to enable input, false otherwise |
| 159 | * \param controller The controller info if enabling, or unused if disabling | 170 | * \param controller_id The controller ID if enabling, or unused if disabling |
| 160 | * | 171 | * |
| 161 | * \return True if keyboard input was enabled, false otherwise | 172 | * \return True if keyboard input was enabled, false otherwise |
| 162 | */ | 173 | */ |
| 163 | bool EnableKeyboard(bool enable, const game_controller* controller); | 174 | bool EnableKeyboard(bool enable, const char* controller_id); |
| 164 | 175 | ||
| 165 | /*! | 176 | /*! |
| 166 | * \brief Enable/disable mouse input using the specified controller | 177 | * \brief Enable/disable mouse input using the specified controller |
| 167 | * | 178 | * |
| 168 | * \param enable True to enable input, false otherwise | 179 | * \param enable True to enable input, false otherwise |
| 169 | * \param controller The controller info if enabling, or unused if disabling | 180 | * \param controller_id The controller ID if enabling, or unused if disabling |
| 170 | * | 181 | * |
| 171 | * \return True if mouse input was enabled, false otherwise | 182 | * \return True if mouse input was enabled, false otherwise |
| 172 | */ | 183 | */ |
| 173 | bool EnableMouse(bool enable, const game_controller* controller); | 184 | bool EnableMouse(bool enable, const char* controller_id); |
| 174 | 185 | ||
| 175 | /*! | 186 | /*! |
| 176 | * \brief Connect/disconnect a controller to a port on the virtual game console | 187 | * \brief Connect/disconnect a controller to a port on the virtual game console |
| 177 | * | 188 | * |
| 178 | * \param connect True to connect a controller, false to disconnect | 189 | * \param connect True to connect a controller, false to disconnect |
| 179 | * \param port_address The address of the port | 190 | * \param port_address The address of the port |
| 180 | * \param controller The controller info if connecting, or unused if disconnecting | 191 | * \param controller_id The controller ID if connecting, or unused if disconnecting |
| 181 | * \return True if the \p controller was (dis-)connected to the port, false otherwise | 192 | * \return True if the \p controller was (dis-)connected to the port, false otherwise |
| 182 | * | 193 | * |
| 183 | * The address is a string that allows traversal of the controller topology. | 194 | * The address is a string that allows traversal of the controller topology. |
| @@ -203,17 +214,17 @@ bool EnableMouse(bool enable, const game_controller* controller); | |||
| 203 | * To connect a multitap to the console's first port, the multitap's controller | 214 | * To connect a multitap to the console's first port, the multitap's controller |
| 204 | * info is set using the port address: | 215 | * info is set using the port address: |
| 205 | * | 216 | * |
| 206 | * 1 | 217 | * /1 |
| 207 | * | 218 | * |
| 208 | * To connect a SNES controller to the second port of the multitap, the | 219 | * To connect a SNES controller to the second port of the multitap, the |
| 209 | * controller info is next set using the address: | 220 | * controller info is next set using the address: |
| 210 | * | 221 | * |
| 211 | * 1/game.controller.multitap/2 | 222 | * /1/game.controller.multitap/2 |
| 212 | * | 223 | * |
| 213 | * Any attempts to connect a controller to a port on a disconnected multitap | 224 | * Any attempts to connect a controller to a port on a disconnected multitap |
| 214 | * will return false. | 225 | * will return false. |
| 215 | */ | 226 | */ |
| 216 | bool ConnectController(bool connect, const char* port_address, const game_controller* controller); | 227 | bool ConnectController(bool connect, const char* port_address, const char* controller_id); |
| 217 | 228 | ||
| 218 | /*! | 229 | /*! |
| 219 | * \brief Notify the add-on of an input event | 230 | * \brief Notify the add-on of an input event |
| @@ -310,6 +321,7 @@ void __declspec(dllexport) get_addon(void* ptr) | |||
| 310 | pClient->toAddon.HasFeature = HasFeature; | 321 | pClient->toAddon.HasFeature = HasFeature; |
| 311 | pClient->toAddon.GetTopology = GetTopology; | 322 | pClient->toAddon.GetTopology = GetTopology; |
| 312 | pClient->toAddon.FreeTopology = FreeTopology; | 323 | pClient->toAddon.FreeTopology = FreeTopology; |
| 324 | pClient->toAddon.SetControllerLayouts = SetControllerLayouts; | ||
| 313 | pClient->toAddon.EnableKeyboard = EnableKeyboard; | 325 | pClient->toAddon.EnableKeyboard = EnableKeyboard; |
| 314 | pClient->toAddon.EnableMouse = EnableMouse; | 326 | pClient->toAddon.EnableMouse = EnableMouse; |
| 315 | pClient->toAddon.ConnectController = ConnectController; | 327 | pClient->toAddon.ConnectController = ConnectController; |
