Según
esta documentación, dicha función recibe un parámetro por referencia en el cual guarda el tamaño de la matriz. Así que sólo deberías copiar la cantidad de elementos que indica ese parámetro tras ser ejecutada la función.
Cita:
Uint8 *SDL_GetKeyState(int *numkeys);
Description
Gets a snapshot of the current keyboard state. The current state is returned as a pointer to an array. The size of this array is stored in numkeys.
|