소스 검색

Merge pull request #56029 from madmiraal/revert-55997-3.x-fix-switch-controller-event-spam

Rémi Verschelde 3 년 전
부모
커밋
9bc750da55
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      main/input_default.cpp

+ 1 - 4
main/input_default.cpp

@@ -811,10 +811,7 @@ void InputDefault::joy_axis(int p_device, int p_axis, const JoyAxis &p_value) {
 
 	Joypad &joy = joy_names[p_device];
 
-	// Make sure that we don't generate events for up to 5% jitter
-	// This is needed for Nintendo Switch Pro controllers, which jitter at rest
-	const float MIN_AXIS_CHANGE = 0.05f;
-	if (fabs(joy.last_axis[p_axis] - p_value.value) < MIN_AXIS_CHANGE) {
+	if (joy.last_axis[p_axis] == p_value.value) {
 		return;
 	}