-InputHandler_PIUIO's coin code is broken\r
-"Random" selections for non-existant BGVids always return the same video\r
-OptionsList: linear tweening is borked despite every other command working\r
+-Recalculate precentages correctly with removal mods and negative BPMs\r
-Full Screen -> Full Screen switch does not actually reset resolution, rather just the window size\r
\r
/* Minor feature additions */\r
return false;\r
\r
SAFE_DELETE( *iter );\r
-\r
m_pCompetitors.erase( iter );\r
+\r
return true;\r
}\r
\r
ASSERT( i <= m_pCompetitors.size() );\r
\r
SAFE_DELETE( m_pCompetitors[i] );\r
-\r
m_pCompetitors.erase( m_pCompetitors.begin() + i );\r
+\r
return true;\r
}\r
\r
#include <map>
/* This code is taken from CNLohr's 3.9 AC build. */
-map< int, RageTimer > m_LastHit;
+map<int, RageTimer> m_LastHit;
void InputHandler::UpdateTimer()
{
void InputHandler::ButtonPressed( DeviceInput di, bool Down )
{
- // this gets spammed a lot.
- /*
- if( di.button != KEY_SPACE )
- LOG->Debug( "%s %s", di.toString().c_str(), Down ? "pressed" : "released" );
- */
-
if( di.ts.IsZero() )
{
di.ts = m_LastUpdate.Half();
++m_iInputsSinceUpdate;
}
+ // uncomment if you need to check timestamps on input...
+ // threaded input should never pass 0.000010 or so.
+ /*
+ if( di.button != KEY_SPACE )
+ LOG->Debug( "%s %s - timestamp, %f", di.toString().c_str(), Down ? "pressed" : "released", di.ts.Ago() );
+ */
+
if( !Down )
{
INPUTFILTER->ButtonPressed( di, Down );
}
InputDevice id = InputDevice(DEVICE_JOY1 + i);
+ DeviceInput di = DeviceInput( id, JOY_1 );
event.type &= ~JS_EVENT_INIT;
switch (event.type) {
// In 2.6.11 using an EMS USB2, the event number for P1 Tri (the first button)
// is being reported as 32 instead of 0. Correct for this.
wrap( iNum, 32 ); // max number of joystick buttons. Make this a constant?
- ButtonPressed( DeviceInput(id, JOY_1 + iNum), event.value );
+
+ // set the DeviceInput timestamp and button
+ di.button = JOY_1 + iNum;
+ di.ts.Touch();
+ ButtonPressed( di, event.value );
break;
}
case JS_EVENT_AXIS: {
DeviceButton neg = (JoystickButton)(JOY_LEFT+2*event.number);
DeviceButton pos = (JoystickButton)(JOY_RIGHT+2*event.number);
- ButtonPressed( DeviceInput(id, neg), event.value < -16000 );
- ButtonPressed( DeviceInput(id, pos), event.value > +16000 );
+
+ di.ts.Touch();
+ di.button = neg; ButtonPressed( di, event.value < -16000 );
+ di.button = pos; ButtonPressed( di, event.value > +16000 );
break;
}