Open Elinvention opened 5 years ago
That code was made to handle the case where EV_FF events with a duration of 0 would be handled as "always active".
Can you log the events that are causing this to happen? I noticed #31 mentions GRID. It could be we're accidentally treating force-feedback events as rumble events, since looking again I don't think we actually check the UI_FF_UPLOAD event type. We report we only support FF_RUMBLE and FF_CONSTANT but it could be we need to handle those differently, or we're getting events we don't report as supported.
Can you log the events that are causing this to happen?
Yes, I logged some of those events. I don't have Grid, but "I hate running backwards" is another game that cause the same issue.
{ "time": 5456.99125; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5456.100125; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788882.221840935; "end_time": 1567788882.221840935 }
{ "time": 5456.214961; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5456.220076; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788882.341850455; "end_time": 1567788882.341850455 }
{ "time": 5457.965109; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5457.972297; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788884.93871887; "end_time": 1567788884.93871887 }
{ "time": 5458.80421; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5458.84153; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788884.205879159; "end_time": 1567788884.205879159 }
{ "time": 5461.2147; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5461.4135; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788887.125913355; "end_time": 1567788887.125913355 }
{ "time": 5461.100106; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5461.100137; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788887.221932378; "end_time": 1567788887.221932378 }
{ "time": 5462.635574; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5462.636192; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788888.757967419; "end_time": 1567788888.757967419 }
{ "time": 5463.147079; "type": 0x0101; "code": 0x0001; "value": 0x00000000; }
{ "time": 5463.148159; "type": 0x0015; "code": 0x0000; "value": 0x00000001; }
{ "in_use": true; "forever": true; "duration": 0; "delay": 0; "repetitions": 0; "start_time": 1567788889.269945238; "end_time": 1567788889.269945238 }
{ "time": 5465.873462; "type": 0x0015; "code": 0x0000; "value": 0x00000000; }
{ "time": 5465.873463; "type": 0x0101; "code": 0x0002; "value": 0x00000000; }
we're getting events we don't report as supported.
From what I can see that's not the case.
I don't know much about FF_RUMBLE and FF_CONSTANT, what's the difference?
Can you try logging the event uploading parts, especially the values in the ff_effect
struct? My next guess is the games are possibly just using one event running all the time but adjusting the strength of it, which we don't have control over with a GC controller.
I don't understand this part of the code. But it seems to work fine with this fix. Fixes #31.