Skip to content

Commit 781129b

Browse files
committed
Finalize 0.5.0
1 parent 9be2b8c commit 781129b

File tree

15 files changed

+169
-77
lines changed

15 files changed

+169
-77
lines changed

ControllerUSB/include/ControllerConfig.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ enum ControllerButton
2121
DPAD_LEFT,
2222
SYNC,
2323
GUIDE,
24+
TOUCHPAD,
2425
NUM_CONTROLLERBUTTONS,
2526
};
2627

ControllerUSB/source/Controllers/Dualshock4Controller.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Result Dualshock4Controller::SendInitBytes()
1717
{
1818
constexpr uint8_t init_bytes[32] = {
1919
0x05, 0x07, 0x00, 0x00,
20-
0x7f, 0x7f,
21-
0x00, 0x00, 0x40,
20+
0x00, 0x00, //initial strong and weak rumble
21+
0x00, 0x00, 0x40, //LED color
2222
0x00, 0x00};
2323

2424
return m_outPipe->Write(init_bytes, sizeof(init_bytes));
@@ -57,6 +57,12 @@ Result Dualshock4Controller::OpenInterfaces()
5757
if (R_FAILED(rc))
5858
return rc;
5959

60+
if (interface->GetDescriptor()->bInterfaceClass != 3)
61+
continue;
62+
63+
if (interface->GetDescriptor()->bInterfaceProtocol != 0)
64+
continue;
65+
6066
if (interface->GetDescriptor()->bNumEndpoints < 2)
6167
continue;
6268

@@ -203,6 +209,7 @@ NormalizedButtonData Dualshock4Controller::GetNormalizedButtonData()
203209
(m_buttonData.dpad == DS4_LEFT) || (m_buttonData.dpad == DS4_UPLEFT) || (m_buttonData.dpad == DS4_DOWNLEFT),
204210
m_buttonData.touchpad_press,
205211
m_buttonData.psbutton,
212+
m_buttonData.touchpad_finger1_unpressed == false,
206213
};
207214

208215
for (int i = 0; i != NUM_CONTROLLERBUTTONS; ++i)

SwitchUSB/source/SwitchHDLHandler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ void SwitchHDLHandler::FillHdlState(const NormalizedButtonData &data)
151151

152152
m_hdlState.buttons |= (data.buttons[16] ? KEY_CAPTURE : 0);
153153
m_hdlState.buttons |= (data.buttons[17] ? KEY_HOME : 0);
154+
m_hdlState.buttons |= (data.buttons[18] ? KEY_TOUCH : 0);
154155
}
155156

156157
void SwitchHDLHandler::UpdateInput()

config/sys-con/config_dualshock3.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ left_stick_deadzone = 10 ; from 0 to 100
33
right_stick_deadzone = 10 ; from 0 to 100
44
trigger_deadzone = 0 ; from 0 to 100
55

6+
color_body = 48,71,105
7+
color_buttons = 22,22,22
8+
9+
; [9.0.0+]
10+
color_leftGrip = 22,33,49
11+
color_rightGrip = 22,33,49
12+
613
swap_dpad_and_lstick = false ; set this to true to swap the d-pad and left stick
714

815
; For information on input mapping, see "example.ini"

config/sys-con/config_dualshock4.ini

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@ left_stick_deadzone = 10 ; from 0 to 100
33
right_stick_deadzone = 10 ; from 0 to 100
44
trigger_deadzone = 0 ; from 0 to 100
55

6+
color_body = 77,77,77
7+
color_buttons = 0,0,0
8+
9+
; [9.0.0+]
10+
color_leftGrip = 33,33,33
11+
color_rightGrip = 33,33,33
12+
613
swap_dpad_and_lstick = false ; set this to true to swap the d-pad and left stick
714

815
; For information on input mapping, see "example.ini"
9-
;key_SYNC = LSTICK_CLICK ; Remove the semicolon at the start to take effect
16+
;key_SYNC = LSTICK_CLICK ; Remove the semicolon at the start to take effect
17+

config/sys-con/config_global.ini

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,2 @@
1-
; Global overwrite config. Controller configs take priority. Doesn't work also
2-
;left_stick_deadzone = 0 ; from 0 to 100
3-
;right_stick_deadzone = 0 ; from 0 to 100
4-
;trigger_deadzone = 0 ; from 0 to 100
5-
6-
;swap_dpad_and_lstick = false ; set this to true to swap the d-pad and left stick
7-
8-
; For information on input mapping, see "example.ini"
9-
; Remove the semicolons below to take effect
10-
;key_FACE_DOWN = FACE_RIGHT
11-
;key_FACE_LEFT = FACE_UP
1+
[global]
2+
use_dualshock_2nd_generation = false

config/sys-con/config_xbox360.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ left_stick_deadzone = 21 ; from 0 to 100
33
right_stick_deadzone = 25 ; from 0 to 100
44
trigger_deadzone = 0 ; from 0 to 100
55

6+
color_body = 77,77,77
7+
color_buttons = 69,121,22
8+
9+
; [9.0.0+]
10+
color_leftGrip = 100,100,100
11+
color_rightGrip = 100,100,100
12+
613
swap_dpad_and_lstick = false ; set this to true to swap the d-pad and left stick
714

815
; For information on input mapping, see "example.ini"

config/sys-con/config_xboxone.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ left_stick_deadzone = 10 ; from 0 to 100
33
right_stick_deadzone = 17 ; from 0 to 100
44
trigger_deadzone = 0 ; from 0 to 100
55

6+
color_body = 107,107,107
7+
color_buttons = 0,0,0
8+
9+
; [9.0.0+]
10+
color_leftGrip = 77,77,77
11+
color_rightGrip = 77,77,77
12+
613
swap_dpad_and_lstick = false ; set this to true to swap the d-pad and left stick
714

815
; For information on input mapping, see "example.ini"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
; Doesn't work properly yet, disabled
12
firmware_path = /config/sys-con/firmware/XboxOneAdapter.bin

config/sys-con/config_xboxorig.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ left_stick_deadzone = 21 ; from 0 to 100
33
right_stick_deadzone = 25 ; from 0 to 100
44
trigger_deadzone = 0 ; from 0 to 100
55

6+
color_body = 77,77,77
7+
color_buttons = 69,121,22
8+
9+
; [9.0.0+]
10+
color_leftGrip = 100,100,100
11+
color_rightGrip = 100,100,100
12+
613
swap_dpad_and_lstick = false ; set this to true to swap the d-pad and left stick
714

815
; For information on input mapping, see "example.ini"

0 commit comments

Comments
 (0)