mirror of
				https://github.com/Ryujinx/SDL.git
				synced 2025-11-04 15:14:56 +00:00 
			
		
		
		
	Fixed the share button on the ThrustMaster eSwap PRO Controller Xbox
(cherry picked from commit e4face7c1d41698067b9afdd8c7f0a8f76774da2)
This commit is contained in:
		
							parent
							
								
									3dff5d3cbe
								
							
						
					
					
						commit
						31a57c05dc
					
				| 
						 | 
				
			
			@ -696,7 +696,7 @@ static void HIDAPI_DriverXboxOne_HandleStatePacket(SDL_Joystick *joystick, SDL_D
 | 
			
		|||
         * Xbox Series X firmware version 5.1, report is 44 bytes, share button is in byte 18
 | 
			
		||||
         * Xbox Series X firmware version 5.5, report is 48 bytes, share button is in byte 22
 | 
			
		||||
         * Victrix Gambit Tournament Controller, report is 50 bytes, share button is in byte 32
 | 
			
		||||
         * ThrustMaster eSwap PRO Controller Xbox, report is 64 bytes, share button is in byte 46
 | 
			
		||||
         * ThrustMaster eSwap PRO Controller Xbox, report is 60 bytes, share button is in byte 46
 | 
			
		||||
         */
 | 
			
		||||
        if (size < 48) {
 | 
			
		||||
            if (ctx->last_state[18] != data[18]) {
 | 
			
		||||
| 
						 | 
				
			
			@ -710,7 +710,7 @@ static void HIDAPI_DriverXboxOne_HandleStatePacket(SDL_Joystick *joystick, SDL_D
 | 
			
		|||
            if (ctx->last_state[32] != data[32]) {
 | 
			
		||||
                SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_MISC1, (data[32] & 0x01) ? SDL_PRESSED : SDL_RELEASED);
 | 
			
		||||
            }
 | 
			
		||||
        } else if (size == 64) {
 | 
			
		||||
        } else if (size == 60) {
 | 
			
		||||
            if (ctx->last_state[46] != data[46]) {
 | 
			
		||||
                SDL_PrivateJoystickButton(joystick, SDL_CONTROLLER_BUTTON_MISC1, (data[46] & 0x01) ? SDL_PRESSED : SDL_RELEASED);
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue