LilyPad: Fixed DS3 motors being flipped, setup default motor bindings on creation, and reduced delay to make sure pads have been initialized when testing force feedback (Probably get rid of it all together once I implement a workaround).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1811 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
mattmenke 2009-09-12 13:23:16 +00:00
parent 73cace2e54
commit 3bb0846264
2 changed files with 13 additions and 4 deletions

View File

@ -1439,6 +1439,15 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
b->axes[1].force = BASE_SENSITIVITY;
}
}
else if (dev->api == DS3 && dev->numFFAxes == 2) {
needSet = 0;
if (cmd == ID_BIG_MOTOR) {
b->axes[0].force = BASE_SENSITIVITY;
}
else {
b->axes[1].force = BASE_SENSITIVITY;
}
}
else if (dev->api == DI) {
int bigIndex=0, littleIndex=0;
int j;
@ -1494,7 +1503,7 @@ INT_PTR CALLBACK DialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, LPARAM l
}
dm->Update(&info);
dm->PostRead();
Sleep(150);
Sleep(100);
dm->Update(&info);
dm->PostRead();
dev->SetEffect(ffb, 255);

View File

@ -120,7 +120,7 @@ struct LightState {
struct DS3Command {
unsigned char id;
unsigned char unsure;
// Big is first, then small.
// Small is first, then big.
MotorState motors[2];
unsigned char noClue[4];
// 2 is pad 1 light, 4 is pad 2, 8 is pad 3, 16 is pad 4. No clue about the others.
@ -164,9 +164,9 @@ public:
int StartWrite() {
writeop.Offset = writeop.OffsetHigh = 0;
for (int i=0; i<2; i++) {
if (vibration[i]) {
if (vibration[i^1]) {
sendState.motors[i].duration = 0x7F;
int force = vibration[i] * 256/FULLY_DOWN;
int force = vibration[i^1] * 256/FULLY_DOWN;
if (force > 255) force = 255;
sendState.motors[i].force = (unsigned char) force;
}