mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-09-23 03:55:44 -04:00
isle: Match readReg to Original
This commit is contained in:
parent
f81c5f944c
commit
1244a7a57b
@ -119,15 +119,17 @@ BOOL readReg(LPCSTR name, LPSTR outValue, DWORD outSize)
|
||||
HKEY hKey;
|
||||
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 (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) {
|
||||
return TRUE;
|
||||
out = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return out;
|
||||
}
|
||||
|
||||
int readRegBool(LPCSTR name, BOOL *out)
|
||||
|
Loading…
x
Reference in New Issue
Block a user