mirror of
https://github.com/Genymobile/scrcpy
synced 2025-01-11 17:29:37 +00:00
Log event size mismatch as verbose
On rotation, it is expected that many successive events are ignored due to size mismatch, when an event was generated from the mirroring window having the old size, but was received on the device with the new size (especially since mouse hover events are forwarded). Do not flood the console with warnings. PR #5455 <https://github.com/Genymobile/scrcpy/pull/5455>
This commit is contained in:
parent
4348f12194
commit
0904880816
@ -360,9 +360,11 @@ public class Controller implements AsyncProcessor, VirtualDisplayListener {
|
||||
|
||||
Point point = displayData.positionMapper.map(position);
|
||||
if (point == null) {
|
||||
if (Ln.isEnabled(Ln.Level.VERBOSE)) {
|
||||
Size eventSize = position.getScreenSize();
|
||||
Size currentSize = displayData.positionMapper.getVideoSize();
|
||||
Ln.w("Ignore touch event generated for size " + eventSize + " (current size is " + currentSize + ")");
|
||||
Ln.v("Ignore touch event generated for size " + eventSize + " (current size is " + currentSize + ")");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -476,9 +478,11 @@ public class Controller implements AsyncProcessor, VirtualDisplayListener {
|
||||
|
||||
Point point = displayData.positionMapper.map(position);
|
||||
if (point == null) {
|
||||
if (Ln.isEnabled(Ln.Level.VERBOSE)) {
|
||||
Size eventSize = position.getScreenSize();
|
||||
Size currentSize = displayData.positionMapper.getVideoSize();
|
||||
Ln.w("Ignore scroll event generated for size " + eventSize + " (current size is " + currentSize + ")");
|
||||
Ln.v("Ignore scroll event generated for size " + eventSize + " (current size is " + currentSize + ")");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user