SDL Wiki
(This is the documentation for SDL3, which is under heavy development and the API is changing! SDL2 is the current stable version!)


Retrieves all pens that are connected to the system.

Header File

Defined in <SDL3/SDL_pen.h>


SDL_PenID * SDL_GetPens(int *count);

Function Parameters

int * count the number of pens in the array (number of array elements minus 1, i.e., not counting the terminator 0).

Return Value

(SDL_PenID *) Returns a 0 terminated array of SDL_PenID values, or NULL on failure. The array must be freed with SDL_free(). On a NULL return, SDL_GetError() is set.


Yields an array of SDL_PenID values. These identify and track pens throughout a session. To track pens across sessions (program restart), use SDL_GUID .


This function is available since SDL 3.0.0.

CategoryAPI, CategoryAPIFunction, CategoryPen

[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.