{"action":"created","issue":{"url":"https://api.github.com/repos/playn/playn/issues/22","labels_url":"https://api.github.com/repos/playn/playn/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/playn/playn/issues/22/comments","events_url":"https://api.github.com/repos/playn/playn/issues/22/events","html_url":"https://github.com/playn/playn/issues/22","id":122235668,"number":22,"title":"HTML hidpi mouse scaling issue (with fix)","user":{"login":"kalimaul","id":1355747,"avatar_url":"https://avatars.githubusercontent.com/u/1355747?v=3","gravatar_id":"","url":"https://api.github.com/users/kalimaul","html_url":"https://github.com/kalimaul","followers_url":"https://api.github.com/users/kalimaul/followers","following_url":"https://api.github.com/users/kalimaul/following{/other_user}","gists_url":"https://api.github.com/users/kalimaul/gists{/gist_id}","starred_url":"https://api.github.com/users/kalimaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalimaul/subscriptions","organizations_url":"https://api.github.com/users/kalimaul/orgs","repos_url":"https://api.github.com/users/kalimaul/repos","events_url":"https://api.github.com/users/kalimaul/events{/privacy}","received_events_url":"https://api.github.com/users/kalimaul/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-15T10:02:46Z","updated_at":"2015-12-15T21:07:26Z","closed_at":null,"body":"When manually setting scaleFactor to 1 on a hidpi device (MacBook Pro Retina 2015), mouse input coordinates become broken. I found the reason for this in HtmlGraphics:\r\n\r\nmouseScale = config.scaleFactor / HtmlPlatform.devicePixelRatio();\r\n\r\ndisabling this workaround (and setting mouseScale to 1) actually fixes my issue. However my game is using a custom scaling method to always fully occupy the available window/space so I'm not sure if that intereferes with this workaround.\r\n\r\nIf I don't change scaleFactor and leave it on its local default value of 2, then I have no problem with mouse coordinates.\r\n\r\nBased on this it seems to me that this mouseScale workaround is unnecessary.\r\n\r\nTested on Google Chrome and Safari."},"comment":{"url":"https://api.github.com/repos/playn/playn/issues/comments/164896794","html_url":"https://github.com/playn/playn/issues/22#issuecomment-164896794","issue_url":"https://api.github.com/repos/playn/playn/issues/22","id":164896794,"user":{"login":"kalimaul","id":1355747,"avatar_url":"https://avatars.githubusercontent.com/u/1355747?v=3","gravatar_id":"","url":"https://api.github.com/users/kalimaul","html_url":"https://github.com/kalimaul","followers_url":"https://api.github.com/users/kalimaul/followers","following_url":"https://api.github.com/users/kalimaul/following{/other_user}","gists_url":"https://api.github.com/users/kalimaul/gists{/gist_id}","starred_url":"https://api.github.com/users/kalimaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalimaul/subscriptions","organizations_url":"https://api.github.com/users/kalimaul/orgs","repos_url":"https://api.github.com/users/kalimaul/repos","events_url":"https://api.github.com/users/kalimaul/events{/privacy}","received_events_url":"https://api.github.com/users/kalimaul/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T21:07:26Z","updated_at":"2015-12-15T21:07:26Z","body":"Thank you! I am grateful for you maintaining this project, it's an awesome tool. Since the last version of scaleFactor did exactly this, I'm hoping this is possible to implement as a small change :)"}}