time: Use a function instead of properties to retrieve the system date and time locale info

This allows applications to re-query the values if the system locale is changed during runtime, and better matches the other locale functions. A note is included in the documentation mentioning that this can be slow, as it has to call into OS functions.

Also allows for the removal of the init/quit time functions, as they are no longer needed.
This commit is contained in:
Frank Praznik
2024-05-08 13:32:37 -04:00
parent e909c0360f
commit 1f43c88220
14 changed files with 119 additions and 100 deletions

View File

@@ -53,7 +53,6 @@
#define SDL_INIT_EVERYTHING ~0U
/* Initialization/Cleanup routines */
#include "time/SDL_time_c.h"
#include "timer/SDL_timer_c.h"
#ifdef SDL_VIDEO_DRIVER_WINDOWS
extern int SDL_HelperWindowCreate(void);
@@ -210,7 +209,6 @@ int SDL_InitSubSystem(Uint32 flags)
}
#endif
SDL_InitTime();
SDL_InitTicks();
/* Initialize the event subsystem */
@@ -543,7 +541,6 @@ void SDL_Quit(void)
SDL_QuitSubSystem(SDL_INIT_EVERYTHING);
SDL_QuitTicks();
SDL_QuitTime();
#ifdef SDL_USE_LIBDBUS
SDL_DBus_Quit();