mirror of
				https://github.com/hedge-dev/UnleashedRecomp.git
				synced 2025-10-30 07:11:05 +00:00 
			
		
		
		
	Merge 12fe00ce73 into 3c1badf183
				
					
				
			This commit is contained in:
		
						commit
						fdbef9bd0a
					
				
					 1 changed files with 11 additions and 1 deletions
				
			
		|  | @ -324,13 +324,18 @@ void hid::Init() | |||
| { | ||||
|     SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1"); | ||||
|     SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE, "1"); | ||||
|     SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_WII, "1"); | ||||
|     SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_SWITCH, "1"); | ||||
|     SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, "1"); | ||||
|     SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS, "1"); | ||||
|     SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS3, "1"); | ||||
|     SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4, "1"); | ||||
|     SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1"); | ||||
|     SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5, "1"); | ||||
|     SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED, "1"); | ||||
|     SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "1"); | ||||
|     SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_WII, "1"); | ||||
|     SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_STEAM, "1"); | ||||
|     SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK, "1"); | ||||
|     SDL_SetHint(SDL_HINT_XINPUT_ENABLED, "1"); | ||||
|      | ||||
|     SDL_SetHint(SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS, "0"); // Uses Button Labels. This hint is disabled for Nintendo Controllers.
 | ||||
|  | @ -339,6 +344,11 @@ void hid::Init() | |||
|     SDL_AddEventWatch(HID_OnSDLEvent, nullptr); | ||||
| 
 | ||||
|     SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER); | ||||
| 
 | ||||
|     // Load controller mappings from SDL_GameControllerDB
 | ||||
|     if (int mappings = SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt"); mappings > 0) { | ||||
|         LOGFN("Loaded {} controller mapping(s) from SDL_GameControllerDB ({})", mappings, "gamecontrollerdb.txt"); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| uint32_t hid::GetState(uint32_t dwUserIndex, XAMINPUT_STATE* pState) | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Al. Lopez
						Al. Lopez