mirror of
				https://github.com/libsdl-org/SDL.git
				synced 2025-11-04 09:44:35 +00:00 
			
		
		
		
	Fix scroll wheel handling in testmouse
This commit is contained in:
		
				
					committed by
					
						
						Sam Lantinga
					
				
			
			
				
	
			
			
			
						parent
						
							63d4bd4e57
						
					
				
				
					commit
					df05d5eff4
				
			@@ -125,10 +125,10 @@ static void loop(void *arg)
 | 
			
		||||
                /* "positive to the right and negative to the left"  */
 | 
			
		||||
                wheel_x += event.wheel.x * 10.0f;
 | 
			
		||||
            }
 | 
			
		||||
            if (event.wheel.x != 0.0f) {
 | 
			
		||||
            if (event.wheel.y != 0.0f) {
 | 
			
		||||
                wheel_y_active = SDL_TRUE;
 | 
			
		||||
                /* "positive away from the user and negative towards the user" */
 | 
			
		||||
                wheel_y -= event.wheel.x * 10.0f;
 | 
			
		||||
                wheel_y -= event.wheel.y * 10.0f;
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user