少年修仙传客户端基础资源
hch
2024-04-01 d01413b00ef631ac20347716b23818b0b811f65f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
 * gunicode-win32-uwp.c: UWP unicode support.
 *
 * Copyright 2016 Microsoft
 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
#include <config.h>
#include <glib.h>
 
#if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
#define CODESET 1
#include <windows.h>
 
extern const char *my_charset;
static gboolean is_utf8;
 
gboolean
g_get_charset (G_CONST_RETURN char **charset)
{
    if (my_charset == NULL) {
        static char buf [14];
        CPINFOEXW cp_info;
 
        GetCPInfoExW (CP_ACP, 0, &cp_info);
        sprintf (buf, "CP%u", cp_info.CodePage);
        my_charset = buf;
        is_utf8 = FALSE;
    }
    
    if (charset != NULL)
        *charset = my_charset;
 
    return is_utf8;
}
 
#else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
 
#ifdef _MSC_VER
// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
void __mono_win32_gunicode_win32_uwp_quiet_lnk4221(void) {}
#endif
#endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */