Add reverse conversion from string to LCID
This commit is contained in:
@@ -123,6 +123,7 @@ extern void plat_resize(int x, int y);
|
|||||||
extern void plat_vidapi_enable(int enabled);
|
extern void plat_vidapi_enable(int enabled);
|
||||||
extern void plat_vid_reload_options(void);
|
extern void plat_vid_reload_options(void);
|
||||||
extern uint32_t plat_language_code(char* langcode);
|
extern uint32_t plat_language_code(char* langcode);
|
||||||
|
extern void plat_language_code_r(uint32_t lcid, char* outbuf, int len);
|
||||||
|
|
||||||
/* Resource management. */
|
/* Resource management. */
|
||||||
extern void set_language(uint32_t id);
|
extern void set_language(uint32_t id);
|
||||||
|
@@ -1221,6 +1221,22 @@ plat_language_code(char* langcode)
|
|||||||
return lcid;
|
return lcid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Converts back the language code to LCID */
|
||||||
|
void
|
||||||
|
plat_language_code_r(uint32_t lcid, char* outbuf, int len)
|
||||||
|
{
|
||||||
|
if (lcid == 0xFFFF)
|
||||||
|
{
|
||||||
|
strcpy(outbuf, "system");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
wchar_t buffer[LOCALE_NAME_MAX_LENGTH + 1];
|
||||||
|
LCIDToLocaleName(lcid, buffer, LOCALE_NAME_MAX_LENGTH, 0);
|
||||||
|
|
||||||
|
c16stombs(outbuf, buffer, len);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
take_screenshot(void)
|
take_screenshot(void)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user