If we don't have focus, discard input.
This commit is contained in:
@@ -684,6 +684,11 @@ static void HandleInputEvents(float fDeltaTime)
|
|||||||
static InputEventArray ieArray;
|
static InputEventArray ieArray;
|
||||||
ieArray.clear(); // empty the array
|
ieArray.clear(); // empty the array
|
||||||
INPUTFILTER->GetInputEvents( ieArray );
|
INPUTFILTER->GetInputEvents( ieArray );
|
||||||
|
|
||||||
|
/* If we don't have focus, discard input. */
|
||||||
|
if( !g_bHasFocus )
|
||||||
|
return;
|
||||||
|
|
||||||
for( unsigned i=0; i<ieArray.size(); i++ )
|
for( unsigned i=0; i<ieArray.size(); i++ )
|
||||||
{
|
{
|
||||||
DeviceInput DeviceI = (DeviceInput)ieArray[i];
|
DeviceInput DeviceI = (DeviceInput)ieArray[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user