mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Introduce PositionMapper
Extract the function that converts coordinates from video space to display space into a separate component. It only requires the specific data it uses and does not need a full ScreenInfo object (although it can be created from a ScreenInfo instance). PR #5370 <https://github.com/Genymobile/scrcpy/pull/5370>
This commit is contained in:
parent
d916429566
commit
f1368d9a8f
3 changed files with 58 additions and 26 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package com.genymobile.scrcpy.video;
|
||||
|
||||
import com.genymobile.scrcpy.AndroidVersions;
|
||||
import com.genymobile.scrcpy.control.PositionMapper;
|
||||
import com.genymobile.scrcpy.device.ConfigurationException;
|
||||
import com.genymobile.scrcpy.device.Device;
|
||||
import com.genymobile.scrcpy.device.DisplayInfo;
|
||||
|
|
@ -132,7 +133,8 @@ public class ScreenCapture extends SurfaceCapture {
|
|||
}
|
||||
}
|
||||
|
||||
device.setScreenInfo(screenInfo);
|
||||
PositionMapper positionMapper = PositionMapper.from(screenInfo);
|
||||
device.setPositionMapper(positionMapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue