From 3bb0846264276223fa6cb1f88d9915999cf608ec Mon Sep 17 00:00:00 2001 From: mattmenke Date: Sat, 12 Sep 2009 13:23:16 +0000 Subject: [PATCH] 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 --- plugins/LilyPad/Config.cpp | 11 ++++++++++- plugins/LilyPad/DualShock3.cpp | 6 +++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/plugins/LilyPad/Config.cpp b/plugins/LilyPad/Config.cpp index 3a249a2148..002d6d6d4e 100644 --- a/plugins/LilyPad/Config.cpp +++ b/plugins/LilyPad/Config.cpp @@ -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); diff --git a/plugins/LilyPad/DualShock3.cpp b/plugins/LilyPad/DualShock3.cpp index 2288fc5970..1afcb31be6 100644 --- a/plugins/LilyPad/DualShock3.cpp +++ b/plugins/LilyPad/DualShock3.cpp @@ -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; }