mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 11:35:56 +00:00
fix: game high dpi support
This commit is contained in:
parent
3798975793
commit
09d3837052
1 changed files with 3 additions and 0 deletions
|
@ -32,6 +32,9 @@ void WinMouseTap::enableMouseEventTap(QWidget *widget, bool enabled)
|
|||
if(enabled) {
|
||||
QRect rc(widget->parentWidget()->mapToGlobal(widget->pos())
|
||||
, widget->size());
|
||||
// high dpi support
|
||||
rc.setTopLeft(rc.topLeft() * widget->devicePixelRatio());
|
||||
rc.setBottomRight(rc.bottomRight() * widget->devicePixelRatio());
|
||||
RECT mainRect;
|
||||
mainRect.left = (LONG)rc.left();
|
||||
mainRect.right = (LONG)rc.right();
|
||||
|
|
Loading…
Add table
Reference in a new issue