use RegistryAccess::GetRegValue
This commit is contained in:
@@ -52,19 +52,13 @@ static BOOL CALLBACK EnumDevices( const DIDEVICEINSTANCE *pdidInstance, void *pC
|
|||||||
|
|
||||||
static void CheckForDirectInputDebugMode()
|
static void CheckForDirectInputDebugMode()
|
||||||
{
|
{
|
||||||
HKEY hkey;
|
int iVal;
|
||||||
if (RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\DirectInput", &hkey) != ERROR_SUCCESS)
|
if( RegistryAccess::GetRegValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\DirectInput", "emulation", iVal) )
|
||||||
return;
|
|
||||||
|
|
||||||
long val;
|
|
||||||
DWORD nSize = sizeof(val);
|
|
||||||
if( RegQueryValueEx(hkey, "emulation", NULL, NULL, (LPBYTE)&val, &nSize) == ERROR_SUCCESS )
|
|
||||||
{
|
{
|
||||||
if( val&0x8 )
|
if( iVal & 0x8 )
|
||||||
LOG->Warn("DirectInput keyboard debug mode appears to be enabled. This reduces\n"
|
LOG->Warn("DirectInput keyboard debug mode appears to be enabled. This reduces\n"
|
||||||
"input timing accuracy significantly. Disabling this is strongly recommended." );
|
"input timing accuracy significantly. Disabling this is strongly recommended." );
|
||||||
}
|
}
|
||||||
RegCloseKey(hkey);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int GetNumUsbHidDevices()
|
static int GetNumUsbHidDevices()
|
||||||
|
|||||||
Reference in New Issue
Block a user