{"action":"created","issue":{"url":"https://api.github.com/repos/d235j/360Controller/issues/79","labels_url":"https://api.github.com/repos/d235j/360Controller/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/d235j/360Controller/issues/79/comments","events_url":"https://api.github.com/repos/d235j/360Controller/issues/79/events","html_url":"https://github.com/d235j/360Controller/issues/79","id":58127680,"number":79,"title":"Is it possible to remap buttons/axis?","user":{"login":"weltonrodrigo","id":1644644,"avatar_url":"https://avatars.githubusercontent.com/u/1644644?v=3","gravatar_id":"","url":"https://api.github.com/users/weltonrodrigo","html_url":"https://github.com/weltonrodrigo","followers_url":"https://api.github.com/users/weltonrodrigo/followers","following_url":"https://api.github.com/users/weltonrodrigo/following{/other_user}","gists_url":"https://api.github.com/users/weltonrodrigo/gists{/gist_id}","starred_url":"https://api.github.com/users/weltonrodrigo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weltonrodrigo/subscriptions","organizations_url":"https://api.github.com/users/weltonrodrigo/orgs","repos_url":"https://api.github.com/users/weltonrodrigo/repos","events_url":"https://api.github.com/users/weltonrodrigo/events{/privacy}","received_events_url":"https://api.github.com/users/weltonrodrigo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-18T21:04:04Z","updated_at":"2015-06-27T22:14:21Z","closed_at":null,"body":"I play this game called Crimsonland.\r\n\r\nThe gamepad works ok on Steam Big Picture and other games, but this one no.\r\n\r\nIt seems to get axis wrong. Right trigger seems switched for right analog sticker.\r\n\r\nIs there a way to remap buttons or axis so I can trick this game?\r\n\r\nThank you."},"comment":{"url":"https://api.github.com/repos/d235j/360Controller/issues/comments/116162625","html_url":"https://github.com/d235j/360Controller/issues/79#issuecomment-116162625","issue_url":"https://api.github.com/repos/d235j/360Controller/issues/79","id":116162625,"user":{"login":"MrLavender","id":2496738,"avatar_url":"https://avatars.githubusercontent.com/u/2496738?v=3","gravatar_id":"","url":"https://api.github.com/users/MrLavender","html_url":"https://github.com/MrLavender","followers_url":"https://api.github.com/users/MrLavender/followers","following_url":"https://api.github.com/users/MrLavender/following{/other_user}","gists_url":"https://api.github.com/users/MrLavender/gists{/gist_id}","starred_url":"https://api.github.com/users/MrLavender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrLavender/subscriptions","organizations_url":"https://api.github.com/users/MrLavender/orgs","repos_url":"https://api.github.com/users/MrLavender/repos","events_url":"https://api.github.com/users/MrLavender/events{/privacy}","received_events_url":"https://api.github.com/users/MrLavender/received_events","type":"User","site_admin":false},"created_at":"2015-06-27T22:14:21Z","updated_at":"2015-06-27T22:14:21Z","body":"The GTA 3 series of games also have this problem with using the L/R trigger axes instead of the right analog stick. It's hard-coded into the game (probably just picks the first axis it sees or something) and so makes it impossible to play because it takes the trigger axis zero readings as the stick being at full up+left, and you can't disable or change it.\r\n\r\nI just added a small hack to make the triggers report the same reading as the right analog stick. Not a very elegant solution but it works perfectly for my needs. Full axis remapping would obviously be much better but something like this at least fixes the dumb games that think the triggers are the right analog stick.\r\n\r\n```\r\nvoid Xbox360Peripheral::fiddleReport(IOBufferMemoryDescriptor *buffer)\r\n{\r\n    ...axis inversion and deadzone fiddling...\r\n\r\n    if (gta3hack) {\r\n        report->trigL = report->right.x/256 + 128;\r\n        report->trigR = report->right.y/256 + 128;\r\n    }\r\n}\r\n```\r\n"}}