{"action":"created","comment":{"url":"https://api.github.com/repos/opentk/opentk/pulls/comments/60826768","id":60826768,"diff_hunk":"@@ -108,18 +125,50 @@ public JoystickHatState GetHat(JoystickHat hat)\n         /// </summary>\n         /// <returns>true if the specified button is pressed; otherwise, false.</returns>\n         /// <param name=\"button\">The <see cref=\"JoystickButton\"/> to query.</param>\n+        [Obsolete(\"The JoystickButton enum supports a maximum of 32 buttons- Please use the int overload instead\")]\n         public bool IsButtonDown(JoystickButton button)\n         {\n+            if ((int)button > 32)\n+            {\n+                Debug.Print(\"Use of the JoystickButton enum supports a maximum of 32 buttons\");\n+                return false;\n+            }\n             return (buttons & (1 << (int)button)) != 0;\n         }\n \n         /// <summary>\n+        /// Gets a value indicating whether the specified <see cref=\"JoystickButton\"/> is currently pressed.\n+        /// </summary>\n+        /// <returns>true if the specified button is pressed; otherwise, false.</returns>\n+        /// <param name=\"button\">The <see cref=\"JoystickButton\"/> to query.</param>\n+        public bool IsButtonDown(int button)\n+        {\n+            return (buttons & (Int64)((Int64)1 << button)) != 0;\n+        }\n+\n+        /// <summary>\n         /// Gets a value indicating whether the specified <see cref=\"JoystickButton\"/> is currently released.\n         /// </summary>\n         /// <returns>true if the specified button is released; otherwise, false.</returns>\n         /// <param name=\"button\">The <see cref=\"JoystickButton\"/> to query.</param>\n+        [Obsolete(\"The JoystickButton enum supports a maximum of 32 buttons- Please use the int overload instead\")]\n         public bool IsButtonUp(JoystickButton button)\n         {\n+            if ((int)button > 32)\n+            {\n+                Debug.Print(\"Use of the JoystickButton enum supports a maximum of 32 buttons\");\n+                return false;\n+            }\n+            return (buttons & (1 << (int)button)) == 0;\n+        }\n+\n+        /// <summary>\n+        /// Gets a value indicating whether the specified <see cref=\"JoystickButton\"/> is currently released.\n+        /// </summary>\n+        /// <returns>true if the specified button is released; otherwise, false.</returns>\n+        /// <param name=\"button\">The <see cref=\"JoystickButton\"/> to query.</param>\n+        public bool IsButtonUp(int button)\n+        {\n             return (buttons & (1 << (int)button)) == 0;","path":"Source/OpenTK/Input/JoystickState.cs","position":97,"original_position":97,"commit_id":"5a1ebd8494e993c1c76aff0934e38d86ea03469c","original_commit_id":"5a1ebd8494e993c1c76aff0934e38d86ea03469c","user":{"login":"cra0zy","id":6773302,"avatar_url":"https://avatars.githubusercontent.com/u/6773302?v=3","gravatar_id":"","url":"https://api.github.com/users/cra0zy","html_url":"https://github.com/cra0zy","followers_url":"https://api.github.com/users/cra0zy/followers","following_url":"https://api.github.com/users/cra0zy/following{/other_user}","gists_url":"https://api.github.com/users/cra0zy/gists{/gist_id}","starred_url":"https://api.github.com/users/cra0zy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cra0zy/subscriptions","organizations_url":"https://api.github.com/users/cra0zy/orgs","repos_url":"https://api.github.com/users/cra0zy/repos","events_url":"https://api.github.com/users/cra0zy/events{/privacy}","received_events_url":"https://api.github.com/users/cra0zy/received_events","type":"User","site_admin":false},"body":"Pointless cast.","created_at":"2016-04-23T10:47:03Z","updated_at":"2016-04-23T10:47:03Z","html_url":"https://github.com/opentk/opentk/pull/380#discussion_r60826768","pull_request_url":"https://api.github.com/repos/opentk/opentk/pulls/380","_links":{"self":{"href":"https://api.github.com/repos/opentk/opentk/pulls/comments/60826768"},"html":{"href":"https://github.com/opentk/opentk/pull/380#discussion_r60826768"},"pull_request":{"href":"https://api.github.com/repos/opentk/opentk/pulls/380"}}},"pull_request":{"url":"https://api.github.com/repos/opentk/opentk/pulls/380","id":67517216,"html_url":"https://github.com/opentk/opentk/pull/380","diff_url":"https://github.com/opentk/opentk/pull/380.diff","patch_url":"https://github.com/opentk/opentk/pull/380.patch","issue_url":"https://api.github.com/repos/opentk/opentk/issues/380","number":380,"state":"open","locked":false,"title":"Convert JoystickButtons to int & increase available **REQUIRES TESTING**","user":{"login":"leezer3","id":7688245,"avatar_url":"https://avatars.githubusercontent.com/u/7688245?v=3","gravatar_id":"","url":"https://api.github.com/users/leezer3","html_url":"https://github.com/leezer3","followers_url":"https://api.github.com/users/leezer3/followers","following_url":"https://api.github.com/users/leezer3/following{/other_user}","gists_url":"https://api.github.com/users/leezer3/gists{/gist_id}","starred_url":"https://api.github.com/users/leezer3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leezer3/subscriptions","organizations_url":"https://api.github.com/users/leezer3/orgs","repos_url":"https://api.github.com/users/leezer3/repos","events_url":"https://api.github.com/users/leezer3/events{/privacy}","received_events_url":"https://api.github.com/users/leezer3/received_events","type":"User","site_admin":false},"body":"This is a continuation of this pull:\r\nhttps://github.com/opentk/opentk/pull/344\r\n\r\n**Changes:**\r\nJoystick buttons have been changed to ints.\r\nButtons up-to and including 32 may be accessed via the old Joystick.Buttons enum, greater than this will print a debug message.\r\nThere is a hard limit of 128 buttons. Probably ought to be accessible via OpenTK.Configuration? Thoughts?\r\n\r\n**Notes:**\r\nI have only tested Windows at the minute. Will do Linux, SDL2 and OS-X tonight, but it should work....\r\nI also haven't cleaned up the code as well as I'd like just yet.","created_at":"2016-04-22T14:09:12Z","updated_at":"2016-04-23T10:47:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63fd84eef536e89eb84a655fa671c5e9c9a91542","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opentk/opentk/pulls/380/commits","review_comments_url":"https://api.github.com/repos/opentk/opentk/pulls/380/comments","review_comment_url":"https://api.github.com/repos/opentk/opentk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opentk/opentk/issues/380/comments","statuses_url":"https://api.github.com/repos/opentk/opentk/statuses/5a1ebd8494e993c1c76aff0934e38d86ea03469c","head":{"label":"leezer3:Joystick2","ref":"Joystick2","sha":"5a1ebd8494e993c1c76aff0934e38d86ea03469c","user":{"login":"leezer3","id":7688245,"avatar_url":"https://avatars.githubusercontent.com/u/7688245?v=3","gravatar_id":"","url":"https://api.github.com/users/leezer3","html_url":"https://github.com/leezer3","followers_url":"https://api.github.com/users/leezer3/followers","following_url":"https://api.github.com/users/leezer3/following{/other_user}","gists_url":"https://api.github.com/users/leezer3/gists{/gist_id}","starred_url":"https://api.github.com/users/leezer3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leezer3/subscriptions","organizations_url":"https://api.github.com/users/leezer3/orgs","repos_url":"https://api.github.com/users/leezer3/repos","events_url":"https://api.github.com/users/leezer3/events{/privacy}","received_events_url":"https://api.github.com/users/leezer3/received_events","type":"User","site_admin":false},"repo":{"id":52087057,"name":"opentk","full_name":"leezer3/opentk","owner":{"login":"leezer3","id":7688245,"avatar_url":"https://avatars.githubusercontent.com/u/7688245?v=3","gravatar_id":"","url":"https://api.github.com/users/leezer3","html_url":"https://github.com/leezer3","followers_url":"https://api.github.com/users/leezer3/followers","following_url":"https://api.github.com/users/leezer3/following{/other_user}","gists_url":"https://api.github.com/users/leezer3/gists{/gist_id}","starred_url":"https://api.github.com/users/leezer3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leezer3/subscriptions","organizations_url":"https://api.github.com/users/leezer3/orgs","repos_url":"https://api.github.com/users/leezer3/repos","events_url":"https://api.github.com/users/leezer3/events{/privacy}","received_events_url":"https://api.github.com/users/leezer3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/leezer3/opentk","description":"This Open Toolkit library is a fast, low-level C# wrapper for OpenGL and OpenAL. It can be used standalone or inside a GUI on Windows, Linux, Mac, Android and iOS.","fork":true,"url":"https://api.github.com/repos/leezer3/opentk","forks_url":"https://api.github.com/repos/leezer3/opentk/forks","keys_url":"https://api.github.com/repos/leezer3/opentk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leezer3/opentk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leezer3/opentk/teams","hooks_url":"https://api.github.com/repos/leezer3/opentk/hooks","issue_events_url":"https://api.github.com/repos/leezer3/opentk/issues/events{/number}","events_url":"https://api.github.com/repos/leezer3/opentk/events","assignees_url":"https://api.github.com/repos/leezer3/opentk/assignees{/user}","branches_url":"https://api.github.com/repos/leezer3/opentk/branches{/branch}","tags_url":"https://api.github.com/repos/leezer3/opentk/tags","blobs_url":"https://api.github.com/repos/leezer3/opentk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leezer3/opentk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leezer3/opentk/git/refs{/sha}","trees_url":"https://api.github.com/repos/leezer3/opentk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leezer3/opentk/statuses/{sha}","languages_url":"https://api.github.com/repos/leezer3/opentk/languages","stargazers_url":"https://api.github.com/repos/leezer3/opentk/stargazers","contributors_url":"https://api.github.com/repos/leezer3/opentk/contributors","subscribers_url":"https://api.github.com/repos/leezer3/opentk/subscribers","subscription_url":"https://api.github.com/repos/leezer3/opentk/subscription","commits_url":"https://api.github.com/repos/leezer3/opentk/commits{/sha}","git_commits_url":"https://api.github.com/repos/leezer3/opentk/git/commits{/sha}","comments_url":"https://api.github.com/repos/leezer3/opentk/comments{/number}","issue_comment_url":"https://api.github.com/repos/leezer3/opentk/issues/comments{/number}","contents_url":"https://api.github.com/repos/leezer3/opentk/contents/{+path}","compare_url":"https://api.github.com/repos/leezer3/opentk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leezer3/opentk/merges","archive_url":"https://api.github.com/repos/leezer3/opentk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leezer3/opentk/downloads","issues_url":"https://api.github.com/repos/leezer3/opentk/issues{/number}","pulls_url":"https://api.github.com/repos/leezer3/opentk/pulls{/number}","milestones_url":"https://api.github.com/repos/leezer3/opentk/milestones{/number}","notifications_url":"https://api.github.com/repos/leezer3/opentk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leezer3/opentk/labels{/name}","releases_url":"https://api.github.com/repos/leezer3/opentk/releases{/id}","deployments_url":"https://api.github.com/repos/leezer3/opentk/deployments","created_at":"2016-02-19T12:43:52Z","updated_at":"2016-02-19T12:43:59Z","pushed_at":"2016-04-22T21:20:54Z","git_url":"git://github.com/leezer3/opentk.git","ssh_url":"git@github.com:leezer3/opentk.git","clone_url":"https://github.com/leezer3/opentk.git","svn_url":"https://github.com/leezer3/opentk","homepage":"http://www.opentk.com","size":66066,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"opentk:develop","ref":"develop","sha":"8e3986174efd39be9d5bf75402da090032968be3","user":{"login":"opentk","id":5914736,"avatar_url":"https://avatars.githubusercontent.com/u/5914736?v=3","gravatar_id":"","url":"https://api.github.com/users/opentk","html_url":"https://github.com/opentk","followers_url":"https://api.github.com/users/opentk/followers","following_url":"https://api.github.com/users/opentk/following{/other_user}","gists_url":"https://api.github.com/users/opentk/gists{/gist_id}","starred_url":"https://api.github.com/users/opentk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentk/subscriptions","organizations_url":"https://api.github.com/users/opentk/orgs","repos_url":"https://api.github.com/users/opentk/repos","events_url":"https://api.github.com/users/opentk/events{/privacy}","received_events_url":"https://api.github.com/users/opentk/received_events","type":"Organization","site_admin":false},"repo":{"id":14318990,"name":"opentk","full_name":"opentk/opentk","owner":{"login":"opentk","id":5914736,"avatar_url":"https://avatars.githubusercontent.com/u/5914736?v=3","gravatar_id":"","url":"https://api.github.com/users/opentk","html_url":"https://github.com/opentk","followers_url":"https://api.github.com/users/opentk/followers","following_url":"https://api.github.com/users/opentk/following{/other_user}","gists_url":"https://api.github.com/users/opentk/gists{/gist_id}","starred_url":"https://api.github.com/users/opentk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentk/subscriptions","organizations_url":"https://api.github.com/users/opentk/orgs","repos_url":"https://api.github.com/users/opentk/repos","events_url":"https://api.github.com/users/opentk/events{/privacy}","received_events_url":"https://api.github.com/users/opentk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opentk/opentk","description":"This Open Toolkit library is a fast, low-level C# wrapper for OpenGL and OpenAL. It can be used standalone or inside a GUI on Windows, Linux, Mac, Android and iOS.","fork":true,"url":"https://api.github.com/repos/opentk/opentk","forks_url":"https://api.github.com/repos/opentk/opentk/forks","keys_url":"https://api.github.com/repos/opentk/opentk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opentk/opentk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opentk/opentk/teams","hooks_url":"https://api.github.com/repos/opentk/opentk/hooks","issue_events_url":"https://api.github.com/repos/opentk/opentk/issues/events{/number}","events_url":"https://api.github.com/repos/opentk/opentk/events","assignees_url":"https://api.github.com/repos/opentk/opentk/assignees{/user}","branches_url":"https://api.github.com/repos/opentk/opentk/branches{/branch}","tags_url":"https://api.github.com/repos/opentk/opentk/tags","blobs_url":"https://api.github.com/repos/opentk/opentk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opentk/opentk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opentk/opentk/git/refs{/sha}","trees_url":"https://api.github.com/repos/opentk/opentk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opentk/opentk/statuses/{sha}","languages_url":"https://api.github.com/repos/opentk/opentk/languages","stargazers_url":"https://api.github.com/repos/opentk/opentk/stargazers","contributors_url":"https://api.github.com/repos/opentk/opentk/contributors","subscribers_url":"https://api.github.com/repos/opentk/opentk/subscribers","subscription_url":"https://api.github.com/repos/opentk/opentk/subscription","commits_url":"https://api.github.com/repos/opentk/opentk/commits{/sha}","git_commits_url":"https://api.github.com/repos/opentk/opentk/git/commits{/sha}","comments_url":"https://api.github.com/repos/opentk/opentk/comments{/number}","issue_comment_url":"https://api.github.com/repos/opentk/opentk/issues/comments{/number}","contents_url":"https://api.github.com/repos/opentk/opentk/contents/{+path}","compare_url":"https://api.github.com/repos/opentk/opentk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opentk/opentk/merges","archive_url":"https://api.github.com/repos/opentk/opentk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opentk/opentk/downloads","issues_url":"https://api.github.com/repos/opentk/opentk/issues{/number}","pulls_url":"https://api.github.com/repos/opentk/opentk/pulls{/number}","milestones_url":"https://api.github.com/repos/opentk/opentk/milestones{/number}","notifications_url":"https://api.github.com/repos/opentk/opentk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opentk/opentk/labels{/name}","releases_url":"https://api.github.com/repos/opentk/opentk/releases{/id}","deployments_url":"https://api.github.com/repos/opentk/opentk/deployments","created_at":"2013-11-12T01:34:24Z","updated_at":"2016-04-22T07:21:57Z","pushed_at":"2016-04-22T21:20:55Z","git_url":"git://github.com/opentk/opentk.git","ssh_url":"git@github.com:opentk/opentk.git","clone_url":"https://github.com/opentk/opentk.git","svn_url":"https://github.com/opentk/opentk","homepage":"http://www.opentk.com","size":72533,"stargazers_count":456,"watchers_count":456,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":195,"mirror_url":null,"open_issues_count":106,"forks":195,"open_issues":106,"watchers":456,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/opentk/opentk/pulls/380"},"html":{"href":"https://github.com/opentk/opentk/pull/380"},"issue":{"href":"https://api.github.com/repos/opentk/opentk/issues/380"},"comments":{"href":"https://api.github.com/repos/opentk/opentk/issues/380/comments"},"review_comments":{"href":"https://api.github.com/repos/opentk/opentk/pulls/380/comments"},"review_comment":{"href":"https://api.github.com/repos/opentk/opentk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opentk/opentk/pulls/380/commits"},"statuses":{"href":"https://api.github.com/repos/opentk/opentk/statuses/5a1ebd8494e993c1c76aff0934e38d86ea03469c"}}}}