GameInput D-Pad is broken, at least for the PS5 DualSense Gamepad.
Repro-steps:
New UE5.7 Empty Project
Plugins: Disable “XInput Device”, Enable “Game Input Base” and “Game Input Windows” (restart)
Add “Input Mapping Context” IMC_Default
Add “Input Action” IA_Test
DefaultInput.ini add settings for the PS5 DualSense:
[GameInputPlatformSettings_Windows GameInputPlatformSettings]
bProcessController=True[/Script/GameInputBase.GameInputDeveloperSettings]
+DeviceConfigurations=(DeviceIdentifier=(VendorId=1356,ProductId=3302),Description=“PS5 DualSense controller”,bOverrideHardwareDeviceIdString=True,OverriddenHardwareDeviceId=“DualSense”,bProcessControllerButtons=True,bProcessControllerSwitchState=True,bProcessControllerAxis=True,ControllerButtonMappingData=((1, “Gamepad_FaceButton_Left”),(2, “Gamepad_FaceButton_Bottom”),(4, “Gamepad_FaceButton_Right”),(8, “Gamepad_FaceButton_Top”),(16, “Gamepad_LeftShoulder”),(32, “Gamepad_RightShoulder”),(64, “Gamepad_LeftTrigger”),(128, “Gamepad_RightTrigger”),(256, “Gamepad_Special_Left”),(512, “Gamepad_Special_Right”),(1024, “Gamepad_LeftThumbstick”),(2048, “Gamepad_RightThumbstick”),(8192, “Gamepad_Special_Left”)),ControllerAxisMappingData=((0, (KeyName=“Gamepad_LeftX”,DeadZone=0.239532,bIsPackedPositveAndNegative=True)),(1, (KeyName=“Gamepad_LeftY”,Scalar=-1.000000,bIsPackedPositveAndNegative=True)),(2, (KeyName=“Gamepad_RightX”,bIsPackedPositveAndNegative=True)),(3, (KeyName=“Gamepad_LeftTriggerAxis”)),(4, (KeyName=“Gamepad_RightTriggerAxis”,DeadZone=0.239532)),(5, (KeyName=“Gamepad_RightY”,Scalar=-1.000000,bIsPackedPositveAndNegative=True))))
bDoNotProcessDuplicateCapabilitiesForSingleUser=True
Open IMC_Default, Add Mapping for IA_Test and map it to “Gamepad D-pad up”
Add Blueprint “PlayerController” BP_PlayerController
Add Blueprint “Character” BP_Player
Add Blueprint “GameMode” and
- set class defaults
- Player Controller to “BP_PlayerController”
- Default pawn to “BP_Player”
BP_PlayerController:
- add “Enhanced Input Local Player Subsystem”, drag out “Add Mapping Context” with mapping context set to IA_Default
- Connect Event BeginPlay to Add Mapping Context
- Add IA_Test to the blueprint
- connect started to “print string” with in string “Started”
- connect completed to “print string” with in string “Completed”
Run the game
- press digipad-up (keep it pressed), notice print of “Started”
- release digipad-up, notice print of “Completed”
- press digipad (keep it pressed), notice spam of "Started, Completed, Started, Completed, … "
- expectation: It should print “Started” once, like the first time we tried it
- release digipad, spam stops
- Alt-tab to a different window. Try the above steps again, notice it works correctly the 1st time, and from that point on is in a broken state. You basically reset it on alt-tab so it works 1 time.