Skip to content

Commit 2d343d6

Browse files
Update SDL_hidapi.inc to 3.4.4
1 parent 76b4ecc commit 2d343d6

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

units/SDL3.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ interface
120120
{$I SDL_time.inc} // 3.4.4
121121
{$I SDL_filesystem.inc} // 3.4.4
122122
{$I SDL_atomic.inc} // 3.4.4
123-
{$I SDL_hidapi.inc} // 3.2.0
123+
{$I SDL_hidapi.inc} // 3.4.4
124124
{$I SDL_metal.inc} // 3.2.0
125125
{$I SDL_vulkan.inc} // 3.2.0
126126
{$I SDL_thread.inc} // 3.2.0

units/SDL_hidapi.inc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,26 @@ function SDL_hid_open(vendor_id: cushort; product_id: cushort; serial_number: pc
242242
function SDL_hid_open_path(path: PAnsiChar): PSDL_hid_device; cdecl;
243243
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_open_path' {$ENDIF} {$ENDIF};
244244

245+
{*
246+
* Get the properties associated with an SDL_hid_device.
247+
*
248+
* The following read-only properties are provided by SDL:
249+
*
250+
* - `SDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER`: the libusb_device_handle
251+
* associated with the device, if it was opened using libusb.
252+
*
253+
* \param dev a device handle returned from SDL_hid_open().
254+
* \returns a valid property ID on success or 0 on failure; call
255+
* SDL_GetError() for more information.
256+
*
257+
* \since This function is available since SDL 3.4.0.
258+
}
259+
function SDL_hid_get_properties(dev: PSDL_hid_device): TSDL_PropertiesID; cdecl;
260+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_hid_get_properties' {$ENDIF} {$ENDIF};
261+
262+
const
263+
SDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER = 'SDL.hidapi.libusb.device.handle';
264+
245265
{*
246266
* Write an Output report to a HID device.
247267
*

0 commit comments

Comments
 (0)