mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 23:48:29 +00:00
timer: Added SDL_GetTicks64(), for a timer that doesn't wrap every ~49 days.
Note that this removes the timeGetTime() fallback on Windows; it is a 32-bit counter and SDL2 should never choose to use it, as it only is needed if QueryPerformanceCounter() isn't available, and QPC is _always_ available on Windows XP and later. OS/2 has a similar situation, but since it isn't clear to me that similar promises can be made about DosTmrQueryTime() even in modern times, I decided to leave the fallback in, with some heroic measures added to try to provide a true 64-bit tick counter despite the 49-day wraparound. That approach can migrate to Windows too, if we discover some truly broken install that doesn't have QPC and still depends on timeGetTime(). Fixes #4870.
This commit is contained in:
@@ -823,3 +823,4 @@
|
||||
#define SDL_asprintf SDL_asprintf_REAL
|
||||
#define SDL_vasprintf SDL_vasprintf_REAL
|
||||
#define SDL_GetWindowICCProfile SDL_GetWindowICCProfile_REAL
|
||||
#define SDL_GetTicks64 SDL_GetTicks64_REAL
|
||||
|
@@ -890,3 +890,4 @@ SDL_DYNAPI_PROC(int,SDL_asprintf,(char **a, SDL_PRINTF_FORMAT_STRING const char
|
||||
#endif
|
||||
SDL_DYNAPI_PROC(int,SDL_vasprintf,(char **a, const char *b, va_list c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_GetWindowICCProfile,(SDL_Window *a, size_t *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(Uint64,SDL_GetTicks64,(void),(),return)
|
||||
|
Reference in New Issue
Block a user