fix: account for hotspot on zoom transform

This commit is contained in:
Virt 2024-06-28 16:31:47 +02:00
commit 80750df211

View file

@ -44,6 +44,10 @@ void CDynamicCursors::renderSoftware(CPointerManager* pointers, SP<CMonitor> pMo
box.y = overridePos->y;
}
// poperly transform hotspot, this first has to undo the hotspot transform from getCursorBoxGlobal
box.x = box.x + pointers->currentCursorImage.hotspot.x - pointers->currentCursorImage.hotspot.x * zoom;
box.y = box.y + pointers->currentCursorImage.hotspot.y - pointers->currentCursorImage.hotspot.y * zoom;
if (box.intersection(CBox{{}, {pMonitor->vecSize}}).empty())
return;