mirror of
				https://github.com/libsdl-org/SDL.git
				synced 2025-11-04 09:44:35 +00:00 
			
		
		
		
	Make sure we go all the way back (within the XBox controller dead zone) to prevent accidentally binding axes inverted
This commit is contained in:
		@@ -413,7 +413,7 @@ WatchJoystick(SDL_Joystick * joystick)
 | 
				
			|||||||
                    if (nCurrentDistance > nFarthestDistance) {
 | 
					                    if (nCurrentDistance > nFarthestDistance) {
 | 
				
			||||||
                        pAxisState->m_nFarthestValue = nValue;
 | 
					                        pAxisState->m_nFarthestValue = nValue;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    if (nCurrentDistance < 10000 && nFarthestDistance > 20000) {
 | 
					                    if (nCurrentDistance <= 8000 && nFarthestDistance >= 20000) {
 | 
				
			||||||
                        /* We've gone out and back, let's bind this axis */
 | 
					                        /* We've gone out and back, let's bind this axis */
 | 
				
			||||||
                        SDL_GameControllerExtendedBind binding;
 | 
					                        SDL_GameControllerExtendedBind binding;
 | 
				
			||||||
                        SDL_zero(binding);
 | 
					                        SDL_zero(binding);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user