From 0573f391575aaf341a7e26acd4e5055cd581e915 Mon Sep 17 00:00:00 2001 From: mattmenke Date: Mon, 14 Sep 2009 11:34:53 +0000 Subject: [PATCH] LilyPad: DS3 tilt support. Why? Because it's there. Can't think of a sane use for it, though. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1822 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/LilyPad/DualShock3.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/LilyPad/DualShock3.cpp b/plugins/LilyPad/DualShock3.cpp index 7b307d7973..b4bcbb9176 100644 --- a/plugins/LilyPad/DualShock3.cpp +++ b/plugins/LilyPad/DualShock3.cpp @@ -224,7 +224,7 @@ public: for (i=0; i<16; i++) { AddPhysicalControl(PSHBTN, i, 0); } - for (; i<20; i++) { + for (; i<23; i++) { AddPhysicalControl(ABSAXIS, i, 0); } AddFFAxis(L"Big Motor", 0); @@ -255,9 +255,12 @@ public: L"L-Stick Y", L"R-Stick X", L"R-Stick Y", + L"Left/Right Tilt", + L"Forward/Back Tilt", + L"???", }; unsigned int i = (unsigned int) (c - physicalControls); - if (i < 20) { + if (i < sizeof(names)/sizeof(names[0])) { return (wchar_t*)names[i]; } return Device::GetPhysicalControlName(c); @@ -315,6 +318,9 @@ public: physicalControlState[17] = CharToAxis(getState[7]); physicalControlState[18] = CharToAxis(getState[8]); physicalControlState[19] = CharToAxis(getState[9]); + physicalControlState[20] = CharToAxis(getState[42]+128); + physicalControlState[21] = CharToAxis(getState[44]+128); + physicalControlState[22] = CharToAxis(getState[46]+128); continue; } else if (res == WAIT_OBJECT_0+1) {