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:
Sam Lantinga committed 2022-12-02 12:37:41 -08:00
1 parent 764b899a13
commit 8121bbd083
96 files changed
+938 -1243

No files matched your search

+2 -9
View File
@@ -42,15 +42,8 @@ static int numhaptics = 0;
int SDL_SYS_HapticInit(void)
{
/* Support for device connect/disconnect is API >= 16 only,
* so we poll every three seconds
* Ref: http://developer.android.com/reference/android/hardware/input/InputManager.InputDeviceListener.html
*/
static Uint32 timeout = 0;
if (SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) {
timeout = SDL_GetTicks() + 3000;
Android_JNI_PollHapticDevices();
}
Android_JNI_PollHapticDevices();
return numhaptics;
}