22 #include "../../SDL_internal.h"
23 #include "../../core/windows/SDL_windows.h"
24 #include "../SDL_syslocale.h"
27 #ifndef MUI_LANGUAGE_NAME
28 #define MUI_LANGUAGE_NAME 0x8
42 const int langrc = GetLocaleInfoA(LOCALE_USER_DEFAULT,
43 LOCALE_SISO639LANGNAME,
46 const int ctryrc = GetLocaleInfoA(LOCALE_USER_DEFAULT,
47 LOCALE_SISO3166CTRYNAME,
48 country,
sizeof (country));
54 SDL_snprintf(
buf, buflen,
"%s%s%s", lang, ctryrc ?
"_" :
"", ctryrc ? country :
"");
79 const ULONG endidx = (ULONG)
SDL_min(buflen, wbuflen - 1);
82 for (
i = 0;
i < endidx;
i++) {
83 const char ch = (char) wbuf[
i];
87 }
else if (ch ==
'-') {
93 buf[str_start] =
'\0';
103 kernel32 = LoadLibraryW(L
"kernel32.dll");
#define SDL_assert(condition)
#define SDL_OutOfMemory()
#define SDL_small_alloc(type, count, pisstack)
#define SDL_small_free(ptr, isstack)
GLenum GLuint GLenum GLsizei const GLchar * buf
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
void SDL_SYS_GetPreferredLocales(char *buf, size_t buflen)
static pfnGetUserPreferredUILanguages pGetUserPreferredUILanguages
static void SDL_SYS_GetPreferredLocales_vista(char *buf, size_t buflen)
static void SDL_SYS_GetPreferredLocales_winxp(char *buf, size_t buflen)
BOOL(WINAPI * pfnGetUserPreferredUILanguages)(DWORD, PULONG, WCHAR *, PULONG)
#define MUI_LANGUAGE_NAME