Update Interface.cpp (#2367)
This commit is contained in:
parent
f4459fe143
commit
18a712ce6a
|
@ -3524,7 +3524,7 @@ bool GetButtonText( const BUTTON& btnButton, LPTSTR Buffer )
|
||||||
DWORD ScanKeyboard( LPDEVICE lpDevice, LPDWORD lpdwCounter, LPBUTTON pButton )
|
DWORD ScanKeyboard( LPDEVICE lpDevice, LPDWORD lpdwCounter, LPBUTTON pButton )
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
BYTE cKeys[256];
|
BYTE cKeys[256] = {0};
|
||||||
|
|
||||||
hr = lpDevice->didHandle->GetDeviceState( sizeof( cKeys ), (LPVOID)&cKeys );
|
hr = lpDevice->didHandle->GetDeviceState( sizeof( cKeys ), (LPVOID)&cKeys );
|
||||||
if ( FAILED(hr) )
|
if ( FAILED(hr) )
|
||||||
|
@ -3534,9 +3534,8 @@ DWORD ScanKeyboard( LPDEVICE lpDevice, LPDWORD lpdwCounter, LPBUTTON pButton )
|
||||||
}
|
}
|
||||||
|
|
||||||
int iGotKey = FALSE;
|
int iGotKey = FALSE;
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
for( i = 0; i < ARRAYSIZE( cKeys ); ++i )
|
for( int i = 1; i < ARRAYSIZE( cKeys ); ++i )
|
||||||
{
|
{
|
||||||
if (( cKeys[i] & 0x80 ) )
|
if (( cKeys[i] & 0x80 ) )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue