mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-27 23:19:11 +00:00
Removed SDL_SensorGetDataWithTimestamp() and SDL_GameControllerGetSensorDataWithTimestamp()
If you care about timestamps you'll also want to catch all of the sensor events instead of just polling the current state. For example, Nintendo Switch controllers generate 3 sensor events with distinct values for each polling interval.
This commit is contained in:
parent
b8760a3ffe
commit
b4da4ed95a
12 changed files with 16 additions and 72 deletions
|
@ -895,25 +895,6 @@ extern DECLSPEC float SDLCALL SDL_GameControllerGetSensorDataRate(SDL_GameContro
|
|||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values);
|
||||
|
||||
/**
|
||||
* Get the current state of a game controller sensor with the timestamp of the
|
||||
* last update.
|
||||
*
|
||||
* The number of values and interpretation of the data is sensor dependent.
|
||||
* See SDL_sensor.h for the details for each type of sensor.
|
||||
*
|
||||
* \param gamecontroller The controller to query
|
||||
* \param type The type of sensor to query
|
||||
* \param timestamp A pointer filled with the timestamp in nanoseconds of the
|
||||
* current sensor reading, which may not be synchronized with the system clock
|
||||
* \param data A pointer filled with the current sensor state
|
||||
* \param num_values The number of values to write to data
|
||||
* \return 0 or -1 if an error occurred.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorDataWithTimestamp(SDL_GameController *gamecontroller, SDL_SensorType type, Uint64 *timestamp, float *data, int num_values);
|
||||
|
||||
/**
|
||||
* Start a rumble effect on a game controller.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue