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:
1 parent
f32cdfa096
commit
73f4aeee6a
36 files changed
+950
-839
No files matched your search
@@ -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)
|
||||
{
|
||||
|
||||
@@ -33,6 +33,7 @@ extern void SDL_TicksInit(void);
|
||||
extern void SDL_TicksQuit(void);
|
||||
extern int SDL_TimerInit(void);
|
||||
extern void SDL_TimerQuit(void);
|
||||
extern Uint64 SDL_GetTickStartNS(void);
|
||||
|
||||
#endif /* SDL_timer_c_h_ */
|
||||
|
||||
|
||||
Reference in new issue
Block a user