[loc] add support for Locale registry setting

* Closes #246
* Also bump version
This commit is contained in:
Pete Batard 2013-12-15 21:27:25 +00:00
parent 1f5fc8ab33
commit 7c35343da7
5 changed files with 29 additions and 18 deletions

View file

@ -38,6 +38,7 @@ extern "C" {
#define REGKEY_UPDATE_INTERVAL "UpdateCheckInterval"
#define REGKEY_INCLUDE_BETAS "CheckForBetas"
#define REGKEY_COMM_CHECK "CommCheck"
#define REGKEY_LOCALE "Locale"
/* Delete a registry key from <key_root>\Software and all its values
If the key has subkeys, this call will fail. */
@ -168,6 +169,7 @@ static __inline BOOL WriteRegistryKey32(HKEY root, const char* key, int32_t val)
// Use a static buffer - don't allocate
static __inline char* ReadRegistryKeyStr(HKEY root, const char* key) {
static char str[512];
str[0] = 0;
_GetRegistryKey(root, key, REG_SZ, (LPBYTE)str, (DWORD)sizeof(str)-1);
return str;
}