mirror of
https://github.com/virtcode/hypr-dynamic-cursors
synced 2025-09-20 00:23:22 +02:00
fix: clamp angles to 0 below threshold
This commit is contained in:
parent
eeffefb426
commit
99e72b979d
1 changed files with 7 additions and 2 deletions
|
@ -269,8 +269,13 @@ void CDynamicCursors::calculate(EModeUpdate type) {
|
||||||
std::abs(this->angle - angle) > ((PI / 180) * **PTHRESHOLD) ||
|
std::abs(this->angle - angle) > ((PI / 180) * **PTHRESHOLD) ||
|
||||||
this->zoom - zoom != 0 // we don't have a threshold here as this will not happen that often
|
this->zoom - zoom != 0 // we don't have a threshold here as this will not happen that often
|
||||||
) {
|
) {
|
||||||
this->zoom = zoom;
|
this->zoom = zoom;
|
||||||
this->angle = angle;
|
this->angle = angle;
|
||||||
|
|
||||||
|
// clamp to zero at low angles, so that the normal position in tilt looks fine (and actually is 0)
|
||||||
|
if (std::abs(this->angle) < ((PI / 180) * **PTHRESHOLD))
|
||||||
|
this->angle = 0;
|
||||||
|
|
||||||
|
|
||||||
// lock software cursors if zooming
|
// lock software cursors if zooming
|
||||||
if (zoom > 1) {
|
if (zoom > 1) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue