{"action":"created","comment":{"url":"https://api.github.com/repos/mumble-voip/mumble/pulls/comments/48340384","id":48340384,"diff_hunk":"@@ -601,6 +615,58 @@ void GlobalShortcutWin::timeTicked() {\n \t\t}\n \t}\n #endif\n+\n+#ifdef USE_XBOXINPUT\n+\tif (g.s.bEnableXboxInput && xboxinput->isValid()) {\n+\t\tfor (DWORD i = 0; i < XUSER_MAX_COUNT; i++) {\n+\t\t\tif (xboxinput->GetState(i, &xinput_state[i]) == ERROR_SUCCESS) {\n+\t\t\t\tif (xinput_last_packet[i] != 0 && xinput_state[i].dwPacketNumber <= xinput_last_packet[i]) {\n+\t\t\t\t\tcontinue;\n+\t\t\t\t}\n+\n+\t\t\t\t// The wButtons DWORD of XINPUT_GAMEPAD contains a bit","path":"src/mumble/GlobalShortcut_win.cpp","position":48,"original_position":48,"commit_id":"b82ec0c9e5e379ed37108f21eadc641a49028b09","original_commit_id":"b82ec0c9e5e379ed37108f21eadc641a49028b09","user":{"login":"mkrautz","id":36527,"avatar_url":"https://avatars.githubusercontent.com/u/36527?v=3","gravatar_id":"","url":"https://api.github.com/users/mkrautz","html_url":"https://github.com/mkrautz","followers_url":"https://api.github.com/users/mkrautz/followers","following_url":"https://api.github.com/users/mkrautz/following{/other_user}","gists_url":"https://api.github.com/users/mkrautz/gists{/gist_id}","starred_url":"https://api.github.com/users/mkrautz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkrautz/subscriptions","organizations_url":"https://api.github.com/users/mkrautz/orgs","repos_url":"https://api.github.com/users/mkrautz/repos","events_url":"https://api.github.com/users/mkrautz/events{/privacy}","received_events_url":"https://api.github.com/users/mkrautz/received_events","type":"User","site_admin":false},"body":"DWORD -> WORD","created_at":"2015-12-23T12:09:10Z","updated_at":"2015-12-23T12:09:10Z","html_url":"https://github.com/mumble-voip/mumble/pull/2013#discussion_r48340384","pull_request_url":"https://api.github.com/repos/mumble-voip/mumble/pulls/2013","_links":{"self":{"href":"https://api.github.com/repos/mumble-voip/mumble/pulls/comments/48340384"},"html":{"href":"https://github.com/mumble-voip/mumble/pull/2013#discussion_r48340384"},"pull_request":{"href":"https://api.github.com/repos/mumble-voip/mumble/pulls/2013"}}},"pull_request":{"url":"https://api.github.com/repos/mumble-voip/mumble/pulls/2013","id":54438346,"html_url":"https://github.com/mumble-voip/mumble/pull/2013","diff_url":"https://github.com/mumble-voip/mumble/pull/2013.diff","patch_url":"https://github.com/mumble-voip/mumble/pull/2013.patch","issue_url":"https://api.github.com/repos/mumble-voip/mumble/issues/2013","number":2013,"state":"open","locked":false,"title":"GlobalShortcut_win, XboxInput: implement native XInput support in GlobalShortcut_win.","user":{"login":"mkrautz","id":36527,"avatar_url":"https://avatars.githubusercontent.com/u/36527?v=3","gravatar_id":"","url":"https://api.github.com/users/mkrautz","html_url":"https://github.com/mkrautz","followers_url":"https://api.github.com/users/mkrautz/followers","following_url":"https://api.github.com/users/mkrautz/following{/other_user}","gists_url":"https://api.github.com/users/mkrautz/gists{/gist_id}","starred_url":"https://api.github.com/users/mkrautz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkrautz/subscriptions","organizations_url":"https://api.github.com/users/mkrautz/orgs","repos_url":"https://api.github.com/users/mkrautz/repos","events_url":"https://api.github.com/users/mkrautz/events{/privacy}","received_events_url":"https://api.github.com/users/mkrautz/received_events","type":"User","site_admin":false},"body":"This commit adds native support for XInput to GlobalShortcut on Windows.\r\n\r\nMost things XInput-related is named XboxInput in an attempt to reduce\r\nconfusion with X11's XInput.\r\n\r\nThis commit adds a new class, XboxInputLibrary, which is a thin wrapper\r\nclass for handling the XInput DLL.\r\n\r\nXboxInputLibrary supports various versions of the XInput DLL, as well as\r\nthe non-public XInputGetStateEx function (ordinal 100) -- if it is\r\navailable in the loaded XInput DLL. XInputGetStateEx makes it possible to\r\nquery the state of the guide button, allowing it to be used as a global\r\nshortcut in Mumble.\r\n\r\nThe most suitable GetState function is chosen by XboxInputLibrary and is\r\nexposed simply via the GetState member variable.\r\n\r\nThis commit does nothing to prevent DirectInput from *also* getting input\r\nfrom any connected Xbox controllers. However, no ill effects have been\r\nobserved yet.\r\n\r\nFor now, the result simply is that -- for the buttons that DirectInput\r\nsupports -- we get a button click from both engines. For example,\r\npressing A yields the equivalent of \"DirectInput:A + Xbox1:A\" as the\r\nshortcut name, because both engines handled the button press.\r\n\r\nIn the future, we should blacklist the DirectInput device if XboxInput\r\nis enabled to rule out any future incompatibilities.\r\n\r\nThe current implementation treats a shortcut from the first Xbox\r\ncontroller as a different shortcut than the same button from a\r\npotential second, third or fourth Xbox controller connected to\r\nthe system. As a result, if a button is bound on the first controller\r\nin one session, Mumble will only respond if that button is pressed on\r\nthe first controller in future sessions.\r\n\r\nFixes mumble-voip/mumble#1995","created_at":"2015-12-23T03:49:34Z","updated_at":"2015-12-23T12:09:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03742217159efb64b479aad3a226258c9d42cfc2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mumble-voip/mumble/pulls/2013/commits","review_comments_url":"https://api.github.com/repos/mumble-voip/mumble/pulls/2013/comments","review_comment_url":"https://api.github.com/repos/mumble-voip/mumble/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mumble-voip/mumble/issues/2013/comments","statuses_url":"https://api.github.com/repos/mumble-voip/mumble/statuses/b82ec0c9e5e379ed37108f21eadc641a49028b09","head":{"label":"mkrautz:xboxinput-win32","ref":"xboxinput-win32","sha":"b82ec0c9e5e379ed37108f21eadc641a49028b09","user":{"login":"mkrautz","id":36527,"avatar_url":"https://avatars.githubusercontent.com/u/36527?v=3","gravatar_id":"","url":"https://api.github.com/users/mkrautz","html_url":"https://github.com/mkrautz","followers_url":"https://api.github.com/users/mkrautz/followers","following_url":"https://api.github.com/users/mkrautz/following{/other_user}","gists_url":"https://api.github.com/users/mkrautz/gists{/gist_id}","starred_url":"https://api.github.com/users/mkrautz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkrautz/subscriptions","organizations_url":"https://api.github.com/users/mkrautz/orgs","repos_url":"https://api.github.com/users/mkrautz/repos","events_url":"https://api.github.com/users/mkrautz/events{/privacy}","received_events_url":"https://api.github.com/users/mkrautz/received_events","type":"User","site_admin":false},"repo":{"id":3210109,"name":"mumble","full_name":"mkrautz/mumble","owner":{"login":"mkrautz","id":36527,"avatar_url":"https://avatars.githubusercontent.com/u/36527?v=3","gravatar_id":"","url":"https://api.github.com/users/mkrautz","html_url":"https://github.com/mkrautz","followers_url":"https://api.github.com/users/mkrautz/followers","following_url":"https://api.github.com/users/mkrautz/following{/other_user}","gists_url":"https://api.github.com/users/mkrautz/gists{/gist_id}","starred_url":"https://api.github.com/users/mkrautz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkrautz/subscriptions","organizations_url":"https://api.github.com/users/mkrautz/orgs","repos_url":"https://api.github.com/users/mkrautz/repos","events_url":"https://api.github.com/users/mkrautz/events{/privacy}","received_events_url":"https://api.github.com/users/mkrautz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mkrautz/mumble","description":"Mumble VoIP Client/Server","fork":true,"url":"https://api.github.com/repos/mkrautz/mumble","forks_url":"https://api.github.com/repos/mkrautz/mumble/forks","keys_url":"https://api.github.com/repos/mkrautz/mumble/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mkrautz/mumble/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mkrautz/mumble/teams","hooks_url":"https://api.github.com/repos/mkrautz/mumble/hooks","issue_events_url":"https://api.github.com/repos/mkrautz/mumble/issues/events{/number}","events_url":"https://api.github.com/repos/mkrautz/mumble/events","assignees_url":"https://api.github.com/repos/mkrautz/mumble/assignees{/user}","branches_url":"https://api.github.com/repos/mkrautz/mumble/branches{/branch}","tags_url":"https://api.github.com/repos/mkrautz/mumble/tags","blobs_url":"https://api.github.com/repos/mkrautz/mumble/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mkrautz/mumble/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mkrautz/mumble/git/refs{/sha}","trees_url":"https://api.github.com/repos/mkrautz/mumble/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mkrautz/mumble/statuses/{sha}","languages_url":"https://api.github.com/repos/mkrautz/mumble/languages","stargazers_url":"https://api.github.com/repos/mkrautz/mumble/stargazers","contributors_url":"https://api.github.com/repos/mkrautz/mumble/contributors","subscribers_url":"https://api.github.com/repos/mkrautz/mumble/subscribers","subscription_url":"https://api.github.com/repos/mkrautz/mumble/subscription","commits_url":"https://api.github.com/repos/mkrautz/mumble/commits{/sha}","git_commits_url":"https://api.github.com/repos/mkrautz/mumble/git/commits{/sha}","comments_url":"https://api.github.com/repos/mkrautz/mumble/comments{/number}","issue_comment_url":"https://api.github.com/repos/mkrautz/mumble/issues/comments{/number}","contents_url":"https://api.github.com/repos/mkrautz/mumble/contents/{+path}","compare_url":"https://api.github.com/repos/mkrautz/mumble/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mkrautz/mumble/merges","archive_url":"https://api.github.com/repos/mkrautz/mumble/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mkrautz/mumble/downloads","issues_url":"https://api.github.com/repos/mkrautz/mumble/issues{/number}","pulls_url":"https://api.github.com/repos/mkrautz/mumble/pulls{/number}","milestones_url":"https://api.github.com/repos/mkrautz/mumble/milestones{/number}","notifications_url":"https://api.github.com/repos/mkrautz/mumble/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mkrautz/mumble/labels{/name}","releases_url":"https://api.github.com/repos/mkrautz/mumble/releases{/id}","created_at":"2012-01-18T16:24:06Z","updated_at":"2015-08-14T23:40:24Z","pushed_at":"2015-12-23T03:50:44Z","git_url":"git://github.com/mkrautz/mumble.git","ssh_url":"git@github.com:mkrautz/mumble.git","clone_url":"https://github.com/mkrautz/mumble.git","svn_url":"https://github.com/mkrautz/mumble","homepage":"http://mumble.info","size":35190,"stargazers_count":6,"watchers_count":6,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":6,"default_branch":"master"}},"base":{"label":"mumble-voip:master","ref":"master","sha":"9b4b7f1e8d7e0ebe9d713feca98b0d302b2283bd","user":{"login":"mumble-voip","id":639008,"avatar_url":"https://avatars.githubusercontent.com/u/639008?v=3","gravatar_id":"","url":"https://api.github.com/users/mumble-voip","html_url":"https://github.com/mumble-voip","followers_url":"https://api.github.com/users/mumble-voip/followers","following_url":"https://api.github.com/users/mumble-voip/following{/other_user}","gists_url":"https://api.github.com/users/mumble-voip/gists{/gist_id}","starred_url":"https://api.github.com/users/mumble-voip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mumble-voip/subscriptions","organizations_url":"https://api.github.com/users/mumble-voip/orgs","repos_url":"https://api.github.com/users/mumble-voip/repos","events_url":"https://api.github.com/users/mumble-voip/events{/privacy}","received_events_url":"https://api.github.com/users/mumble-voip/received_events","type":"Organization","site_admin":false},"repo":{"id":1413319,"name":"mumble","full_name":"mumble-voip/mumble","owner":{"login":"mumble-voip","id":639008,"avatar_url":"https://avatars.githubusercontent.com/u/639008?v=3","gravatar_id":"","url":"https://api.github.com/users/mumble-voip","html_url":"https://github.com/mumble-voip","followers_url":"https://api.github.com/users/mumble-voip/followers","following_url":"https://api.github.com/users/mumble-voip/following{/other_user}","gists_url":"https://api.github.com/users/mumble-voip/gists{/gist_id}","starred_url":"https://api.github.com/users/mumble-voip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mumble-voip/subscriptions","organizations_url":"https://api.github.com/users/mumble-voip/orgs","repos_url":"https://api.github.com/users/mumble-voip/repos","events_url":"https://api.github.com/users/mumble-voip/events{/privacy}","received_events_url":"https://api.github.com/users/mumble-voip/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mumble-voip/mumble","description":"Mumble VoIP Client/Server","fork":false,"url":"https://api.github.com/repos/mumble-voip/mumble","forks_url":"https://api.github.com/repos/mumble-voip/mumble/forks","keys_url":"https://api.github.com/repos/mumble-voip/mumble/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mumble-voip/mumble/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mumble-voip/mumble/teams","hooks_url":"https://api.github.com/repos/mumble-voip/mumble/hooks","issue_events_url":"https://api.github.com/repos/mumble-voip/mumble/issues/events{/number}","events_url":"https://api.github.com/repos/mumble-voip/mumble/events","assignees_url":"https://api.github.com/repos/mumble-voip/mumble/assignees{/user}","branches_url":"https://api.github.com/repos/mumble-voip/mumble/branches{/branch}","tags_url":"https://api.github.com/repos/mumble-voip/mumble/tags","blobs_url":"https://api.github.com/repos/mumble-voip/mumble/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mumble-voip/mumble/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mumble-voip/mumble/git/refs{/sha}","trees_url":"https://api.github.com/repos/mumble-voip/mumble/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mumble-voip/mumble/statuses/{sha}","languages_url":"https://api.github.com/repos/mumble-voip/mumble/languages","stargazers_url":"https://api.github.com/repos/mumble-voip/mumble/stargazers","contributors_url":"https://api.github.com/repos/mumble-voip/mumble/contributors","subscribers_url":"https://api.github.com/repos/mumble-voip/mumble/subscribers","subscription_url":"https://api.github.com/repos/mumble-voip/mumble/subscription","commits_url":"https://api.github.com/repos/mumble-voip/mumble/commits{/sha}","git_commits_url":"https://api.github.com/repos/mumble-voip/mumble/git/commits{/sha}","comments_url":"https://api.github.com/repos/mumble-voip/mumble/comments{/number}","issue_comment_url":"https://api.github.com/repos/mumble-voip/mumble/issues/comments{/number}","contents_url":"https://api.github.com/repos/mumble-voip/mumble/contents/{+path}","compare_url":"https://api.github.com/repos/mumble-voip/mumble/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mumble-voip/mumble/merges","archive_url":"https://api.github.com/repos/mumble-voip/mumble/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mumble-voip/mumble/downloads","issues_url":"https://api.github.com/repos/mumble-voip/mumble/issues{/number}","pulls_url":"https://api.github.com/repos/mumble-voip/mumble/pulls{/number}","milestones_url":"https://api.github.com/repos/mumble-voip/mumble/milestones{/number}","notifications_url":"https://api.github.com/repos/mumble-voip/mumble/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mumble-voip/mumble/labels{/name}","releases_url":"https://api.github.com/repos/mumble-voip/mumble/releases{/id}","created_at":"2011-02-26T01:30:08Z","updated_at":"2015-12-23T05:17:14Z","pushed_at":"2015-12-23T03:57:53Z","git_url":"git://github.com/mumble-voip/mumble.git","ssh_url":"git@github.com:mumble-voip/mumble.git","clone_url":"https://github.com/mumble-voip/mumble.git","svn_url":"https://github.com/mumble-voip/mumble","homepage":"http://www.mumble.info","size":39432,"stargazers_count":1049,"watchers_count":1049,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":348,"mirror_url":null,"open_issues_count":449,"forks":348,"open_issues":449,"watchers":1049,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mumble-voip/mumble/pulls/2013"},"html":{"href":"https://github.com/mumble-voip/mumble/pull/2013"},"issue":{"href":"https://api.github.com/repos/mumble-voip/mumble/issues/2013"},"comments":{"href":"https://api.github.com/repos/mumble-voip/mumble/issues/2013/comments"},"review_comments":{"href":"https://api.github.com/repos/mumble-voip/mumble/pulls/2013/comments"},"review_comment":{"href":"https://api.github.com/repos/mumble-voip/mumble/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mumble-voip/mumble/pulls/2013/commits"},"statuses":{"href":"https://api.github.com/repos/mumble-voip/mumble/statuses/b82ec0c9e5e379ed37108f21eadc641a49028b09"}}}}