{"action":"created","issue":{"url":"https://api.github.com/repos/Genymobile/scrcpy/issues/2","repository_url":"https://api.github.com/repos/Genymobile/scrcpy","labels_url":"https://api.github.com/repos/Genymobile/scrcpy/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Genymobile/scrcpy/issues/2/comments","events_url":"https://api.github.com/repos/Genymobile/scrcpy/issues/2/events","html_url":"https://github.com/Genymobile/scrcpy/issues/2","id":303676310,"number":2,"title":"Screen Resolution Issue After Rotation","user":{"login":"Duckinahat","id":6315010,"avatar_url":"https://avatars1.githubusercontent.com/u/6315010?v=4","gravatar_id":"","url":"https://api.github.com/users/Duckinahat","html_url":"https://github.com/Duckinahat","followers_url":"https://api.github.com/users/Duckinahat/followers","following_url":"https://api.github.com/users/Duckinahat/following{/other_user}","gists_url":"https://api.github.com/users/Duckinahat/gists{/gist_id}","starred_url":"https://api.github.com/users/Duckinahat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Duckinahat/subscriptions","organizations_url":"https://api.github.com/users/Duckinahat/orgs","repos_url":"https://api.github.com/users/Duckinahat/repos","events_url":"https://api.github.com/users/Duckinahat/events{/privacy}","received_events_url":"https://api.github.com/users/Duckinahat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-08T23:56:51Z","updated_at":"2018-03-09T15:37:30Z","closed_at":null,"author_association":"NONE","body":"Hi, I noticed an issue that arises when using the default camera app on my phone.  When I enter my camera in portrait mode it works fine.  If I change to landscape however the viewing window does not follow and instead gets squished.  Upon rotating back to portrait, the window remains in a weird squished state. This continues after closing the app and returning to the home screen.  I have been able to fix this by entering a different app that supports a landscape mode (such as messaging) where the window will correctly resize.  \r\n\r\nWhen first initialized, the terminal shows:\r\n`INFO: Initial texture: 1440x2560`\r\nI have noticed that when changing orientation in most apps the computer recieves a `[h264 @ 0x7fa2140008c0] Reinit context to 1440x2560, pix_fmt: yuv420p` and then reorients the display window accordingly. However, I noticed that when the camera app changes to landscape no reinit message appears in the terminal.  Navigating to a different app and rotating yields a reinit and fixes the issue.\r\n\r\nI am sure this is the source of the issue, I don't know how scrcpy gets the signal to reinit the display.  Wondering if there's perhaps a different signal that could be caught?\r\n\r\nI built scrcpy on desktop Ubuntu 16.04 64-bit and it seems to be working just fine besides this.  The phone is a stock LG G5 running android 7.0\r\n\r\nLet me know if there's any more information that would be helpful.  Thanks for looking."},"comment":{"url":"https://api.github.com/repos/Genymobile/scrcpy/issues/comments/371847598","html_url":"https://github.com/Genymobile/scrcpy/issues/2#issuecomment-371847598","issue_url":"https://api.github.com/repos/Genymobile/scrcpy/issues/2","id":371847598,"user":{"login":"Duckinahat","id":6315010,"avatar_url":"https://avatars1.githubusercontent.com/u/6315010?v=4","gravatar_id":"","url":"https://api.github.com/users/Duckinahat","html_url":"https://github.com/Duckinahat","followers_url":"https://api.github.com/users/Duckinahat/followers","following_url":"https://api.github.com/users/Duckinahat/following{/other_user}","gists_url":"https://api.github.com/users/Duckinahat/gists{/gist_id}","starred_url":"https://api.github.com/users/Duckinahat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Duckinahat/subscriptions","organizations_url":"https://api.github.com/users/Duckinahat/orgs","repos_url":"https://api.github.com/users/Duckinahat/repos","events_url":"https://api.github.com/users/Duckinahat/events{/privacy}","received_events_url":"https://api.github.com/users/Duckinahat/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T15:37:30Z","updated_at":"2018-03-09T15:37:30Z","author_association":"NONE","body":"Interesting,  I wonder why then it leaves it in an odd state afterwards.  When the phone rotates in the camera app, the scrcpy window rotates the contents inside without resizing.  Does scrcpy get orientation information from the gyroscope as well?  \r\n\r\nI took a series of screenshots of the window exactly as it appears.  \r\nPortrait:\r\n![camera_portrait](https://user-images.githubusercontent.com/6315010/37214884-478c941a-236b-11e8-9896-04c0ea4d7131.jpg)\r\nLandscape:\r\n![camera_landscape](https://user-images.githubusercontent.com/6315010/37214894-4de2d478-236b-11e8-837e-5fbdd60c0851.jpg)\r\nPortrait (again):\r\n![camera_portrait_return](https://user-images.githubusercontent.com/6315010/37214898-50aa5492-236b-11e8-8467-91198b08109e.jpg)\r\n\r\nIt seems to know the phone is horizontal, or else the second photo would simply appear sideways and not squished, correct?\r\n"}}
{"actor":{"display_login":"Duckinahat"}}