Skip to content

Commit

Permalink
Sync SDL3 header -> wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
SDLWikiBot committed Apr 15, 2024
1 parent fa18ddd commit 232121e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
8 changes: 6 additions & 2 deletions SDL3/README/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1631,15 +1631,19 @@ If you were using this macro for other things besides SDL ticks values, you can
## SDL_touch.h
SDL_GetNumTouchFingers() returns a negative error code if there was an error.
SDL_GetTouchName is replaced with SDL_GetTouchDeviceName(), which takes an SDL_TouchID instead of an index.
SDL_TouchID and SDL_FingerID are now Uint64 with 0 being an invalid value.
Rather than iterating over touch devices using an index, there is a new function SDL_GetTouchDevices() to get the available devices.
Rather than iterating over touch fingers using an index, there is a new function SDL_GetTouchFingers() to get the current set of active fingers.
The following functions have been removed:
* SDL_GetNumTouchDevices() - replaced with SDL_GetTouchDevices()
* SDL_GetNumTouchFingers() - replaced with SDL_GetTouchFingers()
* SDL_GetTouchDevice() - replaced with SDL_GetTouchDevices()
* SDL_GetTouchFinger() - replaced with SDL_GetTouchFingers()
## SDL_version.h
Expand Down
36 changes: 36 additions & 0 deletions SDL3/SDL_GetTouchFingers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!)
# SDL_GetTouchFingers

Get a list of active fingers for a given touch device.

## Header File

Defined in [SDL_touch.h](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_touch.h), but apps should use `#include <SDL3/SDL.h>`

## Syntax

```c
extern DECLSPEC SDL_Finger **SDLCALL SDL_GetTouchFingers(SDL_TouchID touchID, int *count);

```
## Function Parameters
| | |
| --------------- | --------------------------------------------------------------------- |
| **touchID** | the ID of a touch device |
| **count** | a pointer filled in with the number of fingers returned, can be NULL. |
## Return Value
Returns a NULL terminated array of [SDL_Finger](SDL_Finger) pointers which
should be freed with [SDL_free](SDL_free)(), or NULL on error; call
[SDL_GetError](SDL_GetError)() for more details.
## Version
This function is available since SDL 3.0.0.
----
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction)

0 comments on commit 232121e

Please sign in to comment.