mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-16 08:18:13 +00:00
Pass the event timestamp for joystick events
This allows the application to get more fine grained information about controller event timing, and group events that happened together.
This commit is contained in:
@@ -538,6 +538,16 @@ void SDL_TicksQuit(void)
|
||||
tick_start = 0;
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_GetTickStartNS(void)
|
||||
{
|
||||
if (!tick_start) {
|
||||
SDL_TicksInit();
|
||||
}
|
||||
|
||||
return (tick_start * SDL_NS_PER_SECOND) / tick_freq;
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_GetTicksNS(void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user