mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-26 01:17:55 -05:00
isle: Match readReg to Original
This commit is contained in:
parent
f81c5f944c
commit
1244a7a57b
1 changed files with 5 additions and 3 deletions
|
@ -119,15 +119,17 @@ BOOL readReg(LPCSTR name, LPSTR outValue, DWORD outSize)
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
DWORD valueType;
|
DWORD valueType;
|
||||||
|
|
||||||
|
BOOL out = FALSE;
|
||||||
|
unsigned long size = outSize;
|
||||||
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
|
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
|
||||||
if (RegQueryValueExA(hKey, name, NULL, &valueType, (LPBYTE) outValue, &outSize) == ERROR_SUCCESS) {
|
if (RegQueryValueExA(hKey, name, NULL, &valueType, (LPBYTE) outValue, &size) == ERROR_SUCCESS) {
|
||||||
if (RegCloseKey(hKey) == ERROR_SUCCESS) {
|
if (RegCloseKey(hKey) == ERROR_SUCCESS) {
|
||||||
return TRUE;
|
out = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
int readRegBool(LPCSTR name, BOOL *out)
|
int readRegBool(LPCSTR name, BOOL *out)
|
||||||
|
|
Loading…
Reference in a new issue