{"action":"opened","number":6774,"pull_request":{"url":"https://api.github.com/repos/libretro/RetroArch/pulls/6774","id":187665572,"html_url":"https://github.com/libretro/RetroArch/pull/6774","diff_url":"https://github.com/libretro/RetroArch/pull/6774.diff","patch_url":"https://github.com/libretro/RetroArch/pull/6774.patch","issue_url":"https://api.github.com/repos/libretro/RetroArch/issues/6774","number":6774,"state":"open","locked":false,"title":"Fix the way offsets are calculated for keyboard remapping","user":{"login":"sergiou87","id":1083228,"avatar_url":"https://avatars3.githubusercontent.com/u/1083228?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiou87","html_url":"https://github.com/sergiou87","followers_url":"https://api.github.com/users/sergiou87/followers","following_url":"https://api.github.com/users/sergiou87/following{/other_user}","gists_url":"https://api.github.com/users/sergiou87/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiou87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiou87/subscriptions","organizations_url":"https://api.github.com/users/sergiou87/orgs","repos_url":"https://api.github.com/users/sergiou87/repos","events_url":"https://api.github.com/users/sergiou87/events{/privacy}","received_events_url":"https://api.github.com/users/sergiou87/received_events","type":"User","site_admin":false},"body":"## Description\r\n\r\nThis fixes a problem when trying to map the Keyboard to more than 2 users. The way offsets were calculated/applied, made the final `type` / identifiers go beyond `MENU_SETTINGS_INPUT_DESC_KBD_END`.\r\n\r\nInitially they were like: `(MENU_SETTINGS_INPUT_DESC_KBD_BEGIN  +  retro_id) * (p + 1)`, where `retro_id` is the identifier of one of the buttons being mapped (from 0 to 15), and `p` is the number of player.\r\n\r\nIn this PR it has changed to follow the same approach as other mappers: `MENU_SETTINGS_INPUT_DESC_KBD_BEGIN + (p * RARCH_FIRST_CUSTOM_BIND) + retro_id`\r\n\r\nChanging this also required to fix the way `retro_id` and `p` are obtained back from those identifiers.\r\n\r\n## Related Issues\r\n\r\nI found this issue while implementing https://github.com/libretro/dosbox-libretro/pull/85 (original issue: https://github.com/libretro/dosbox-libretro/issues/57)\r\n\r\n## Reviewers\r\n\r\n@twinaphex @fr500 since I see you're the most active devs in these files lately 😅 \r\n","created_at":"2018-05-13T11:42:51Z","updated_at":"2018-05-13T11:42:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/libretro/RetroArch/pulls/6774/commits","review_comments_url":"https://api.github.com/repos/libretro/RetroArch/pulls/6774/comments","review_comment_url":"https://api.github.com/repos/libretro/RetroArch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libretro/RetroArch/issues/6774/comments","statuses_url":"https://api.github.com/repos/libretro/RetroArch/statuses/35b709768d5283e45ba371952cf1c30f51062c12","head":{"label":"sergiou87:fix-keyboard-mapping","ref":"fix-keyboard-mapping","sha":"35b709768d5283e45ba371952cf1c30f51062c12","user":{"login":"sergiou87","id":1083228,"avatar_url":"https://avatars3.githubusercontent.com/u/1083228?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiou87","html_url":"https://github.com/sergiou87","followers_url":"https://api.github.com/users/sergiou87/followers","following_url":"https://api.github.com/users/sergiou87/following{/other_user}","gists_url":"https://api.github.com/users/sergiou87/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiou87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiou87/subscriptions","organizations_url":"https://api.github.com/users/sergiou87/orgs","repos_url":"https://api.github.com/users/sergiou87/repos","events_url":"https://api.github.com/users/sergiou87/events{/privacy}","received_events_url":"https://api.github.com/users/sergiou87/received_events","type":"User","site_admin":false},"repo":{"id":133194870,"name":"RetroArch","full_name":"sergiou87/RetroArch","owner":{"login":"sergiou87","id":1083228,"avatar_url":"https://avatars3.githubusercontent.com/u/1083228?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiou87","html_url":"https://github.com/sergiou87","followers_url":"https://api.github.com/users/sergiou87/followers","following_url":"https://api.github.com/users/sergiou87/following{/other_user}","gists_url":"https://api.github.com/users/sergiou87/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiou87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiou87/subscriptions","organizations_url":"https://api.github.com/users/sergiou87/orgs","repos_url":"https://api.github.com/users/sergiou87/repos","events_url":"https://api.github.com/users/sergiou87/events{/privacy}","received_events_url":"https://api.github.com/users/sergiou87/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sergiou87/RetroArch","description":"Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.","fork":true,"url":"https://api.github.com/repos/sergiou87/RetroArch","forks_url":"https://api.github.com/repos/sergiou87/RetroArch/forks","keys_url":"https://api.github.com/repos/sergiou87/RetroArch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sergiou87/RetroArch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sergiou87/RetroArch/teams","hooks_url":"https://api.github.com/repos/sergiou87/RetroArch/hooks","issue_events_url":"https://api.github.com/repos/sergiou87/RetroArch/issues/events{/number}","events_url":"https://api.github.com/repos/sergiou87/RetroArch/events","assignees_url":"https://api.github.com/repos/sergiou87/RetroArch/assignees{/user}","branches_url":"https://api.github.com/repos/sergiou87/RetroArch/branches{/branch}","tags_url":"https://api.github.com/repos/sergiou87/RetroArch/tags","blobs_url":"https://api.github.com/repos/sergiou87/RetroArch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sergiou87/RetroArch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sergiou87/RetroArch/git/refs{/sha}","trees_url":"https://api.github.com/repos/sergiou87/RetroArch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sergiou87/RetroArch/statuses/{sha}","languages_url":"https://api.github.com/repos/sergiou87/RetroArch/languages","stargazers_url":"https://api.github.com/repos/sergiou87/RetroArch/stargazers","contributors_url":"https://api.github.com/repos/sergiou87/RetroArch/contributors","subscribers_url":"https://api.github.com/repos/sergiou87/RetroArch/subscribers","subscription_url":"https://api.github.com/repos/sergiou87/RetroArch/subscription","commits_url":"https://api.github.com/repos/sergiou87/RetroArch/commits{/sha}","git_commits_url":"https://api.github.com/repos/sergiou87/RetroArch/git/commits{/sha}","comments_url":"https://api.github.com/repos/sergiou87/RetroArch/comments{/number}","issue_comment_url":"https://api.github.com/repos/sergiou87/RetroArch/issues/comments{/number}","contents_url":"https://api.github.com/repos/sergiou87/RetroArch/contents/{+path}","compare_url":"https://api.github.com/repos/sergiou87/RetroArch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sergiou87/RetroArch/merges","archive_url":"https://api.github.com/repos/sergiou87/RetroArch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sergiou87/RetroArch/downloads","issues_url":"https://api.github.com/repos/sergiou87/RetroArch/issues{/number}","pulls_url":"https://api.github.com/repos/sergiou87/RetroArch/pulls{/number}","milestones_url":"https://api.github.com/repos/sergiou87/RetroArch/milestones{/number}","notifications_url":"https://api.github.com/repos/sergiou87/RetroArch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sergiou87/RetroArch/labels{/name}","releases_url":"https://api.github.com/repos/sergiou87/RetroArch/releases{/id}","deployments_url":"https://api.github.com/repos/sergiou87/RetroArch/deployments","created_at":"2018-05-13T00:56:29Z","updated_at":"2018-05-13T00:56:41Z","pushed_at":"2018-05-13T11:34:49Z","git_url":"git://github.com/sergiou87/RetroArch.git","ssh_url":"git@github.com:sergiou87/RetroArch.git","clone_url":"https://github.com/sergiou87/RetroArch.git","svn_url":"https://github.com/sergiou87/RetroArch","homepage":"http://www.libretro.com","size":168911,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"libretro:master","ref":"master","sha":"08820b5245f8b67d50d73925db8caf0539b66150","user":{"login":"libretro","id":1812827,"avatar_url":"https://avatars1.githubusercontent.com/u/1812827?v=4","gravatar_id":"","url":"https://api.github.com/users/libretro","html_url":"https://github.com/libretro","followers_url":"https://api.github.com/users/libretro/followers","following_url":"https://api.github.com/users/libretro/following{/other_user}","gists_url":"https://api.github.com/users/libretro/gists{/gist_id}","starred_url":"https://api.github.com/users/libretro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libretro/subscriptions","organizations_url":"https://api.github.com/users/libretro/orgs","repos_url":"https://api.github.com/users/libretro/repos","events_url":"https://api.github.com/users/libretro/events{/privacy}","received_events_url":"https://api.github.com/users/libretro/received_events","type":"Organization","site_admin":false},"repo":{"id":689344,"name":"RetroArch","full_name":"libretro/RetroArch","owner":{"login":"libretro","id":1812827,"avatar_url":"https://avatars1.githubusercontent.com/u/1812827?v=4","gravatar_id":"","url":"https://api.github.com/users/libretro","html_url":"https://github.com/libretro","followers_url":"https://api.github.com/users/libretro/followers","following_url":"https://api.github.com/users/libretro/following{/other_user}","gists_url":"https://api.github.com/users/libretro/gists{/gist_id}","starred_url":"https://api.github.com/users/libretro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libretro/subscriptions","organizations_url":"https://api.github.com/users/libretro/orgs","repos_url":"https://api.github.com/users/libretro/repos","events_url":"https://api.github.com/users/libretro/events{/privacy}","received_events_url":"https://api.github.com/users/libretro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libretro/RetroArch","description":"Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.","fork":false,"url":"https://api.github.com/repos/libretro/RetroArch","forks_url":"https://api.github.com/repos/libretro/RetroArch/forks","keys_url":"https://api.github.com/repos/libretro/RetroArch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libretro/RetroArch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libretro/RetroArch/teams","hooks_url":"https://api.github.com/repos/libretro/RetroArch/hooks","issue_events_url":"https://api.github.com/repos/libretro/RetroArch/issues/events{/number}","events_url":"https://api.github.com/repos/libretro/RetroArch/events","assignees_url":"https://api.github.com/repos/libretro/RetroArch/assignees{/user}","branches_url":"https://api.github.com/repos/libretro/RetroArch/branches{/branch}","tags_url":"https://api.github.com/repos/libretro/RetroArch/tags","blobs_url":"https://api.github.com/repos/libretro/RetroArch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libretro/RetroArch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libretro/RetroArch/git/refs{/sha}","trees_url":"https://api.github.com/repos/libretro/RetroArch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libretro/RetroArch/statuses/{sha}","languages_url":"https://api.github.com/repos/libretro/RetroArch/languages","stargazers_url":"https://api.github.com/repos/libretro/RetroArch/stargazers","contributors_url":"https://api.github.com/repos/libretro/RetroArch/contributors","subscribers_url":"https://api.github.com/repos/libretro/RetroArch/subscribers","subscription_url":"https://api.github.com/repos/libretro/RetroArch/subscription","commits_url":"https://api.github.com/repos/libretro/RetroArch/commits{/sha}","git_commits_url":"https://api.github.com/repos/libretro/RetroArch/git/commits{/sha}","comments_url":"https://api.github.com/repos/libretro/RetroArch/comments{/number}","issue_comment_url":"https://api.github.com/repos/libretro/RetroArch/issues/comments{/number}","contents_url":"https://api.github.com/repos/libretro/RetroArch/contents/{+path}","compare_url":"https://api.github.com/repos/libretro/RetroArch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libretro/RetroArch/merges","archive_url":"https://api.github.com/repos/libretro/RetroArch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libretro/RetroArch/downloads","issues_url":"https://api.github.com/repos/libretro/RetroArch/issues{/number}","pulls_url":"https://api.github.com/repos/libretro/RetroArch/pulls{/number}","milestones_url":"https://api.github.com/repos/libretro/RetroArch/milestones{/number}","notifications_url":"https://api.github.com/repos/libretro/RetroArch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libretro/RetroArch/labels{/name}","releases_url":"https://api.github.com/repos/libretro/RetroArch/releases{/id}","deployments_url":"https://api.github.com/repos/libretro/RetroArch/deployments","created_at":"2010-05-27T14:47:40Z","updated_at":"2018-05-13T04:43:27Z","pushed_at":"2018-05-13T04:43:23Z","git_url":"git://github.com/libretro/RetroArch.git","ssh_url":"git@github.com:libretro/RetroArch.git","clone_url":"https://github.com/libretro/RetroArch.git","svn_url":"https://github.com/libretro/RetroArch","homepage":"http://www.libretro.com","size":168873,"stargazers_count":2267,"watchers_count":2267,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":707,"mirror_url":null,"archived":false,"open_issues_count":972,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":707,"open_issues":972,"watchers":2267,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libretro/RetroArch/pulls/6774"},"html":{"href":"https://github.com/libretro/RetroArch/pull/6774"},"issue":{"href":"https://api.github.com/repos/libretro/RetroArch/issues/6774"},"comments":{"href":"https://api.github.com/repos/libretro/RetroArch/issues/6774/comments"},"review_comments":{"href":"https://api.github.com/repos/libretro/RetroArch/pulls/6774/comments"},"review_comment":{"href":"https://api.github.com/repos/libretro/RetroArch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libretro/RetroArch/pulls/6774/commits"},"statuses":{"href":"https://api.github.com/repos/libretro/RetroArch/statuses/35b709768d5283e45ba371952cf1c30f51062c12"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":23,"deletions":32,"changed_files":5}}
{"actor":{"display_login":"sergiou87"}}