Skip to content

Commit

Permalink
Merge pull request #598 from vangers-app/fix_spotpoint
Browse files Browse the repository at this point in the history
Do not affect actual mouse position with spot point
  • Loading branch information
stalkerg committed Jul 15, 2022
2 parents 658d1f5 + 2abceb1 commit bedf745
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/xgraph/xgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1657,8 +1657,8 @@ static unsigned short XGR_MouseDefFrameHC[240] =

void XGR_Mouse::Init(int x,int y,int sx,int sy,int num,void* p)
{
PosX = x;
PosY = y;
PosX = x - SpotX;
PosY = y - SpotX;
SizeX = sx;
SizeY = sy;
PosZ = LastPosZ = MovementZ = 0;
Expand Down Expand Up @@ -1846,8 +1846,8 @@ void XGR_Mouse::InitPos(int x,int y)
LastSizeX = SizeX;
LastSizeY = SizeY;

PosX = x;
PosY = y;
PosX = x - SpotX;
PosY = y - SpotY;

AdjustPos();
}
Expand Down Expand Up @@ -1882,10 +1882,10 @@ void XGR_Mouse::SetPos(int x,int y)
LastSizeX = SizeX;
LastSizeY = SizeY;

PosX = x;
PosY = y;
PosX = x - SpotX;
PosY = y - SpotY;

//AdjustPos();
AdjustPos();

// pt.x = PosX;
// pt.y = PosY;
Expand Down

0 comments on commit bedf745

Please sign in to comment.