Skip to content

Commit

Permalink
Fix passing of mouse coordinates to user_mot
Browse files Browse the repository at this point in the history
  • Loading branch information
kelihlodversson committed Aug 15, 2018
1 parent 2bf7764 commit 5a8c574
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vdi/vdi_rpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void mouse_int(UBYTE *buf)
BYTE delta_x, delta_y;
IntPoint point;
void (*user_but)(WORD) = linea_vars.user_but;
void (*user_mot)(IntPoint*) = (void (*)(IntPoint*))linea_vars.user_mot;
void (*user_mot)(ULONG) = (void (*)(LONG))linea_vars.user_mot;
void (*user_cur)(WORD,WORD) = linea_vars.user_cur;

if(linea_vars.mouse_flag) // If we are in a show/hide operation
Expand Down Expand Up @@ -127,7 +127,7 @@ void mouse_int(UBYTE *buf)
point.x = linea_vars.GCURX + delta_x;
point.y = linea_vars.GCURY + delta_y;
scrn_clip(&point);
user_mot(&point); // call user to modify x,y
user_mot(MAKE_ULONG(point.x,point.y)); // call user to modify x,y
scrn_clip(&point);
linea_vars.GCURX = point.x;
linea_vars.GCURY = point.y;
Expand Down

0 comments on commit 5a8c574

Please sign in to comment.