{"action":"created","issue":{"url":"https://api.github.com/repos/MonoGame/MonoGame/issues/6958","repository_url":"https://api.github.com/repos/MonoGame/MonoGame","labels_url":"https://api.github.com/repos/MonoGame/MonoGame/issues/6958/labels{/name}","comments_url":"https://api.github.com/repos/MonoGame/MonoGame/issues/6958/comments","events_url":"https://api.github.com/repos/MonoGame/MonoGame/issues/6958/events","html_url":"https://github.com/MonoGame/MonoGame/pull/6958","id":533340814,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQ5NDMyMTM3","number":6958,"title":"Reduce chance of losing mouse events due to Mouse.SetPosition()","user":{"login":"bartwe","id":117214,"node_id":"MDQ6VXNlcjExNzIxNA==","avatar_url":"https://avatars3.githubusercontent.com/u/117214?v=4","gravatar_id":"","url":"https://api.github.com/users/bartwe","html_url":"https://github.com/bartwe","followers_url":"https://api.github.com/users/bartwe/followers","following_url":"https://api.github.com/users/bartwe/following{/other_user}","gists_url":"https://api.github.com/users/bartwe/gists{/gist_id}","starred_url":"https://api.github.com/users/bartwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartwe/subscriptions","organizations_url":"https://api.github.com/users/bartwe/orgs","repos_url":"https://api.github.com/users/bartwe/repos","events_url":"https://api.github.com/users/bartwe/events{/privacy}","received_events_url":"https://api.github.com/users/bartwe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2019-12-05T13:07:51Z","updated_at":"2019-12-22T09:39:41Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/MonoGame/MonoGame/pulls/6958","html_url":"https://github.com/MonoGame/MonoGame/pull/6958","diff_url":"https://github.com/MonoGame/MonoGame/pull/6958.diff","patch_url":"https://github.com/MonoGame/MonoGame/pull/6958.patch"},"body":"Reduce chance of losing mouse events or reading stale data due to Mouse.SetPosition's potential async delay.\r\n\r\nIt does this by waiting to read mouse state till after the Wait for the start of the framelimiter, (avoids some input lag)\r\nThen determining the delta of mouse movement since the previous frame, then applying that delta to the requested SetPosition (this avoids losing some of the mouse movement)\r\nThis also ensures the least time is lost between GetCursorPos and SetCursorPos and the most time is between the previous SetCursorPos and the next GetCursorPos\r\n\r\nThis is not a complete fix as SetCursorPos can have a non-zero delay before having an effect on GetCursorPos which can lose some mouse input or in extreme cases cause the recenter to not happen by the next frame of the game causing phantom input as per https://github.com/MonoGame/MonoGame/issues/6262#issuecomment-417878184\r\n\r\n![image](https://user-images.githubusercontent.com/117214/70237741-23083700-1768-11ea-9613-fb209146b557.png)\r\n"},"comment":{"url":"https://api.github.com/repos/MonoGame/MonoGame/issues/comments/568246454","html_url":"https://github.com/MonoGame/MonoGame/pull/6958#issuecomment-568246454","issue_url":"https://api.github.com/repos/MonoGame/MonoGame/issues/6958","id":568246454,"node_id":"MDEyOklzc3VlQ29tbWVudDU2ODI0NjQ1NA==","user":{"login":"mrhelmut","id":3427451,"node_id":"MDQ6VXNlcjM0Mjc0NTE=","avatar_url":"https://avatars3.githubusercontent.com/u/3427451?v=4","gravatar_id":"","url":"https://api.github.com/users/mrhelmut","html_url":"https://github.com/mrhelmut","followers_url":"https://api.github.com/users/mrhelmut/followers","following_url":"https://api.github.com/users/mrhelmut/following{/other_user}","gists_url":"https://api.github.com/users/mrhelmut/gists{/gist_id}","starred_url":"https://api.github.com/users/mrhelmut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrhelmut/subscriptions","organizations_url":"https://api.github.com/users/mrhelmut/orgs","repos_url":"https://api.github.com/users/mrhelmut/repos","events_url":"https://api.github.com/users/mrhelmut/events{/privacy}","received_events_url":"https://api.github.com/users/mrhelmut/received_events","type":"User","site_admin":false},"created_at":"2019-12-22T09:39:41Z","updated_at":"2019-12-22T09:39:41Z","author_association":"CONTRIBUTOR","body":"Summoning @Jjagg and @cra0zy to have their thoughts."}}
{"actor":{"display_login":"mrhelmut"}}