Keep screen info in cache
Currently, we only use screen information (width, height, rotation) once at initialization, to send the device size to the client. To be able to scale mouse events, make it accessible in memory. For this purpose, replace the "static" DeviceUtil to a singleton Device, and update it on every screen rotation.
This commit is contained in:
@@ -23,7 +23,7 @@ SRC := com/genymobile/scrcpy/ScrCpyServer.java \
|
||||
com/genymobile/scrcpy/ControlEvent.java \
|
||||
com/genymobile/scrcpy/ControlEventReader.java \
|
||||
com/genymobile/scrcpy/DesktopConnection.java \
|
||||
com/genymobile/scrcpy/DeviceUtil.java \
|
||||
com/genymobile/scrcpy/Device.java \
|
||||
com/genymobile/scrcpy/EventController.java \
|
||||
com/genymobile/scrcpy/ScreenInfo.java \
|
||||
com/genymobile/scrcpy/ScreenStreamer.java \
|
||||
|
||||
Reference in New Issue
Block a user