mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-12 19:21:15 +00:00
improve accuracy of ReadReg functions
This commit is contained in:
parent
818192770c
commit
ad5dd2ba06
@ -110,7 +110,7 @@ void Isle::Close()
|
||||
}
|
||||
|
||||
// OFFSET: ISLE 0x402740
|
||||
BOOL ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize)
|
||||
BOOL Isle::ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize)
|
||||
{
|
||||
HKEY hKey;
|
||||
DWORD valueType;
|
||||
@ -129,7 +129,7 @@ BOOL ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize)
|
||||
}
|
||||
|
||||
// OFFSET: ISLE 0x4027b0
|
||||
int ReadRegBool(LPCSTR name, BOOL *out)
|
||||
int Isle::ReadRegBool(LPCSTR name, BOOL *out)
|
||||
{
|
||||
char buffer[256];
|
||||
|
||||
@ -149,11 +149,11 @@ int ReadRegBool(LPCSTR name, BOOL *out)
|
||||
}
|
||||
|
||||
// OFFSET: ISLE 0x402880
|
||||
int ReadRegInt(LPCSTR name, int *out)
|
||||
int Isle::ReadRegInt(LPCSTR name, int *out)
|
||||
{
|
||||
char buffer[256];
|
||||
|
||||
if (ReadReg(name, buffer, sizeof(buffer))) {
|
||||
if (Isle::ReadReg(name, buffer, sizeof(buffer))) {
|
||||
*out = atoi(buffer);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -14,6 +14,10 @@ class Isle
|
||||
|
||||
void Close();
|
||||
|
||||
BOOL ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize);
|
||||
int ReadRegBool(LPCSTR name, BOOL *out);
|
||||
int ReadRegInt(LPCSTR name, int *out);
|
||||
|
||||
MxResult SetupWindow(HINSTANCE hInstance);
|
||||
|
||||
void Tick(BOOL sleepIfNotNextFrame);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user