Skip to content

Commit

Permalink
fix(adb): handle screen orientation
Browse files Browse the repository at this point in the history
fix #69
  • Loading branch information
NateScarlet committed Jun 20, 2021
1 parent a79804d commit 3a9a880
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions auto_derby/clients/adb.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ def load_size(self):
assert match, "unexpected command result: %s" % res
self._width = int(match.group(2))
self._height = int(match.group(1))
if self._width > self._height:
# handle orientation
self._height, self._width = self._width, self._height
LOGGER.debug("screen size: width=%d height=%d", self.width, self.height)

def setup(self) -> None:
Expand Down

0 comments on commit 3a9a880

Please sign in to comment.