better error
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
#include "InputFilter.h"
|
#include "InputFilter.h"
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "RageInput.h"
|
#include "RageInput.h"
|
||||||
|
#include "RageUtil.h"
|
||||||
#include "RageThreads.h"
|
#include "RageThreads.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -55,8 +56,8 @@ void InputFilter::ButtonPressed( DeviceInput di, bool Down )
|
|||||||
if( di.ts.IsZero() )
|
if( di.ts.IsZero() )
|
||||||
LOG->Warn( "InputFilter::ButtonPressed: zero timestamp is invalid" );
|
LOG->Warn( "InputFilter::ButtonPressed: zero timestamp is invalid" );
|
||||||
|
|
||||||
ASSERT( di.device < NUM_INPUT_DEVICES );
|
ASSERT_M( di.device < NUM_INPUT_DEVICES, ssprintf("dev %i,%i", di.device, NUM_INPUT_DEVICES) );
|
||||||
ASSERT( di.button < GetNumDeviceButtons(di.device) );
|
ASSERT_M( di.button < GetNumDeviceButtons(di.device), ssprintf("button %i,%i", di.button, GetNumDeviceButtons(di.device)) );
|
||||||
ButtonState &bs = m_ButtonState[di.device][di.button];
|
ButtonState &bs = m_ButtonState[di.device][di.button];
|
||||||
|
|
||||||
bs.m_Level = di.level;
|
bs.m_Level = di.level;
|
||||||
|
|||||||
Reference in New Issue
Block a user