mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-28 05:58:29 +00:00
Convert ticks to 64-bit, added nanosecond precision to the API
Fixes https://github.com/libsdl-org/SDL/issues/5512 Fixes https://github.com/libsdl-org/SDL/issues/6731
This commit is contained in:
@@ -494,9 +494,10 @@ static void ANDROID_JoystickDetect(void)
|
||||
* so we poll every three seconds
|
||||
* Ref: http://developer.android.com/reference/android/hardware/input/InputManager.InputDeviceListener.html
|
||||
*/
|
||||
static Uint32 timeout = 0;
|
||||
if (!timeout || SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) {
|
||||
timeout = SDL_GetTicks() + 3000;
|
||||
static Uint64 timeout = 0;
|
||||
Uint64 now = SDL_GetTicks();
|
||||
if (!timeout || now >= timeout) {
|
||||
timeout = now + 3000;
|
||||
Android_JNI_PollInputDevices();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user