mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 05:27:48 +00:00
Added SDL_hid_ble_scan() for pairing Steam Controllers on iOS and tvOS
This commit is contained in:
@@ -853,3 +853,4 @@
|
||||
#define SDL_JoystickHasRumbleTriggers SDL_JoystickHasRumbleTriggers_REAL
|
||||
#define SDL_GameControllerHasRumble SDL_GameControllerHasRumble_REAL
|
||||
#define SDL_GameControllerHasRumbleTriggers SDL_GameControllerHasRumbleTriggers_REAL
|
||||
#define SDL_hid_ble_scan SDL_hid_ble_scan_REAL
|
||||
|
||||
@@ -922,3 +922,4 @@ SDL_DYNAPI_PROC(SDL_bool,SDL_JoystickHasRumble,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_JoystickHasRumbleTriggers,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_GameControllerHasRumble,(SDL_GameController *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_GameControllerHasRumbleTriggers,(SDL_GameController *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_hid_ble_scan,(SDL_bool a),(a),)
|
||||
|
||||
@@ -1492,6 +1492,13 @@ int SDL_hid_get_indexed_string(SDL_hid_device *device, int string_index, wchar_t
|
||||
return result;
|
||||
}
|
||||
|
||||
void SDL_hid_ble_scan(SDL_bool active)
|
||||
{
|
||||
#if __IPHONEOS__ || __TVOS__
|
||||
hid_ble_scan(active);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_ENABLE_GAMECUBE_ADAPTORS
|
||||
/* This is needed to enable input for Nyko and EVORETRO GameCube adaptors */
|
||||
void SDL_EnableGameCubeAdaptors(void)
|
||||
|
||||
@@ -406,6 +406,10 @@ namespace NAMESPACE {
|
||||
*/
|
||||
HID_API_EXPORT const wchar_t* HID_API_CALL hid_error(hid_device *dev);
|
||||
|
||||
#if __IPHONEOS__ || __TVOS__
|
||||
HID_API_EXPORT void HID_API_CALL hid_ble_scan(int active);
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && !defined(NAMESPACE)
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -743,7 +743,7 @@ int HID_API_EXPORT HID_API_CALL hid_exit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void HID_API_EXPORT HID_API_CALL hid_ble_scan( bool bStart )
|
||||
void HID_API_EXPORT HID_API_CALL hid_ble_scan( int bStart )
|
||||
{
|
||||
HIDBLEManager *bleManager = HIDBLEManager.sharedInstance;
|
||||
if ( bStart )
|
||||
|
||||
Reference in New Issue
Block a user