{"action":"created","issue":{"url":"https://api.github.com/repos/opentk/opentk/issues/453","repository_url":"https://api.github.com/repos/opentk/opentk","labels_url":"https://api.github.com/repos/opentk/opentk/issues/453/labels{/name}","comments_url":"https://api.github.com/repos/opentk/opentk/issues/453/comments","events_url":"https://api.github.com/repos/opentk/opentk/issues/453/events","html_url":"https://github.com/opentk/opentk/pull/453","id":191285030,"number":453,"title":"Improve Joystick Buttons","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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-11-23T14:28:51Z","updated_at":"2016-11-28T07:33:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/opentk/opentk/pulls/453","html_url":"https://github.com/opentk/opentk/pull/453","diff_url":"https://github.com/opentk/opentk/pull/453.diff","patch_url":"https://github.com/opentk/opentk/pull/453.patch"},"body":"https://github.com/opentk/opentk/pull/380\r\n\r\nI initially tried to update my branch with your changes, but it threw an absolute fit :)\r\nFor the minute, this is an (IMHO) mergable change, which takes our buttons maximum to 64.\r\n\r\nGoing higher than 64 buttons requires an array and a bunch more logic, whereas this has been a simple replacement of a few casts.\r\n\r\n### Summary:\r\n* Remove JoystickButton enum (Use zero-based int as button index instead)\r\n* Change to using a long to store button states\r\n* Max buttons now 64 (Unable to go further without using an array)\r\n\r\n### Further thoughts:\r\nAn array based solution has the issue that no matter what, the array needs initializing.\r\n\r\nThe fact that **JoystickState** is a struct means that we cannot use a parameterless constructor, which is an issue.\r\nMy initial attempt at doing this 6 months ago used a non-default constructor, which is seriously yuck code.\r\n\r\nSeveral potential avenues I see at the minute:\r\n\r\n1. Convert _JoystickState_ to a class. Serious amount of work to sort out, and I don't know enough about the GC or speed implications to even consider doing this off my own bat. This though would allow us to use a default constructor.\r\n2. Store our _MaxButttons_ value in a singleton public class (*_OpenTK.Configuration_* presumably), and just hook into this when we init the array. This is probably the 'best' idea, but would require work on the part of end-developers. It also has the issue that we're unnecessarily initing an array when the buttons are >= 64. Dunno exactly what the load factor on this is, although it's obviously minor.\r\n3. Create two _JoystickState_ structs depending on how many buttons we have. Seriously yuck, but punting it out there anyways!\r\n4. Custom constructor for _JoystickState_ . Again, this is seriously yuck code, as if we forget to call it, everything comes down around our ears. Obviously end-users would never see this, but hacks like this are never clever to start with, and *always* come back to bite you eventually.\r\n5. ????\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/opentk/opentk/issues/comments/263201782","html_url":"https://github.com/opentk/opentk/pull/453#issuecomment-263201782","issue_url":"https://api.github.com/repos/opentk/opentk/issues/453","id":263201782,"user":{"login":"varon","id":1936994,"avatar_url":"https://avatars.githubusercontent.com/u/1936994?v=3","gravatar_id":"","url":"https://api.github.com/users/varon","html_url":"https://github.com/varon","followers_url":"https://api.github.com/users/varon/followers","following_url":"https://api.github.com/users/varon/following{/other_user}","gists_url":"https://api.github.com/users/varon/gists{/gist_id}","starred_url":"https://api.github.com/users/varon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varon/subscriptions","organizations_url":"https://api.github.com/users/varon/orgs","repos_url":"https://api.github.com/users/varon/repos","events_url":"https://api.github.com/users/varon/events{/privacy}","received_events_url":"https://api.github.com/users/varon/received_events","type":"User","site_admin":false},"created_at":"2016-11-28T07:33:38Z","updated_at":"2016-11-28T07:33:38Z","body":"@wcdeich4 I think you've confused two things here. OpenTK IS presently using Paket for dependency management. Paket uses NuGet Packages internally. Because we're using Paket, we don't need to 'manually' use `packages.config`.\r\n\r\nRather than how OpenTK works internally, the issue we're talking about is how people can use OpenTK. As stated above, I suggest that distribution should only be done via NuGet anyway."}}
{"actor":{"display_login":"varon"}}