Browse Source

Preliminary language support in GUI

pull/277/head
Valentin Radu 4 years ago
parent
commit
e997c67da3
  1. 12
      ExplorerPatcher/GUI.c

12
ExplorerPatcher/GUI.c

@ -1,5 +1,6 @@
#include "GUI.h" #include "GUI.h"
LANGID locale;
void* GUI_FileMapping = NULL; void* GUI_FileMapping = NULL;
DWORD GUI_FileSize = 0; DWORD GUI_FileSize = 0;
BOOL g_darkModeEnabled = FALSE; BOOL g_darkModeEnabled = FALSE;
@ -1416,10 +1417,21 @@ __declspec(dllexport) int ZZGUI(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLin
stdout stdout
); );
} }
dwSize = LOCALE_NAME_MAX_LENGTH;
locale = GetUserDefaultUILanguage();
RegQueryValueExW(
hKey,
TEXT("Language"),
0,
NULL,
&locale,
&dwSize
);
if (hKey) if (hKey)
{ {
RegCloseKey(hKey); RegCloseKey(hKey);
} }
wprintf(L"%d\n", locale);
wchar_t wszPath[MAX_PATH]; wchar_t wszPath[MAX_PATH];
ZeroMemory( ZeroMemory(

Loading…
Cancel
Save