diff options
Diffstat (limited to 'contrib/SDL-3.2.8/test/pretest.c')
| -rw-r--r-- | contrib/SDL-3.2.8/test/pretest.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/test/pretest.c b/contrib/SDL-3.2.8/test/pretest.c new file mode 100644 index 0000000..d207d5e --- /dev/null +++ b/contrib/SDL-3.2.8/test/pretest.c | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* | ||
| 2 | Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org> | ||
| 3 | |||
| 4 | This software is provided 'as-is', without any express or implied | ||
| 5 | warranty. In no event will the authors be held liable for any damages | ||
| 6 | arising from the use of this software. | ||
| 7 | |||
| 8 | Permission is granted to anyone to use this software for any purpose, | ||
| 9 | including commercial applications, and to alter it and redistribute it | ||
| 10 | freely. | ||
| 11 | */ | ||
| 12 | /* Call SDL_GetPrefPath to warm the SHGetFolderPathW cache */ | ||
| 13 | |||
| 14 | /** | ||
| 15 | * We noticed frequent ci timeouts running testfilesystem on 32-bit Windows. | ||
| 16 | * Internally, this functions calls Shell32.SHGetFolderPathW. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #include <SDL3/SDL.h> | ||
| 20 | #include <SDL3/SDL_main.h> | ||
| 21 | |||
| 22 | int main(int argc, char *argv[]) | ||
| 23 | { | ||
| 24 | Uint64 start; | ||
| 25 | Uint64 prequit; | ||
| 26 | (void)argc; | ||
| 27 | (void)argv; | ||
| 28 | SDL_Init(0); | ||
| 29 | start = SDL_GetTicks(); | ||
| 30 | SDL_free(SDL_GetPrefPath("libsdl", "test_filesystem")); | ||
| 31 | prequit = SDL_GetTicks(); | ||
| 32 | SDL_Log("SDL_GetPrefPath took %" SDL_PRIu64 "ms", prequit - start); | ||
| 33 | SDL_Quit(); | ||
| 34 | SDL_Log("SDL_Quit took %" SDL_PRIu64 "ms", SDL_GetTicks() - prequit); | ||
| 35 | return 0; | ||
| 36 | } | ||
