fix mouse scrolling on windows
parent
2810b9ac0f
commit
14c096dd82
|
@ -285,7 +285,7 @@ SYMBOL: nc-buttons
|
||||||
swap [ push ] [ delete ] if ;
|
swap [ push ] [ delete ] if ;
|
||||||
|
|
||||||
: >lo-hi ( WORD -- array ) [ lo-word ] keep hi-word 2array ;
|
: >lo-hi ( WORD -- array ) [ lo-word ] keep hi-word 2array ;
|
||||||
: mouse-wheel ( lParam -- array ) >lo-hi [ sgn neg ] map ;
|
: mouse-wheel ( wParam -- array ) >lo-hi [ sgn neg ] map ;
|
||||||
|
|
||||||
: mouse-absolute>relative ( lparam handle -- array )
|
: mouse-absolute>relative ( lparam handle -- array )
|
||||||
[ >lo-hi ] dip
|
[ >lo-hi ] dip
|
||||||
|
@ -338,8 +338,8 @@ SYMBOL: nc-buttons
|
||||||
>lo-hi swap window move-hand fire-motion ;
|
>lo-hi swap window move-hand fire-motion ;
|
||||||
|
|
||||||
:: handle-wm-mousewheel ( hWnd uMsg wParam lParam -- )
|
:: handle-wm-mousewheel ( hWnd uMsg wParam lParam -- )
|
||||||
lParam mouse-wheel
|
wParam mouse-wheel
|
||||||
hWnd mouse-absolute>relative
|
lParam hWnd mouse-absolute>relative
|
||||||
hWnd window send-wheel ;
|
hWnd window send-wheel ;
|
||||||
|
|
||||||
: handle-wm-cancelmode ( hWnd uMsg wParam lParam -- )
|
: handle-wm-cancelmode ( hWnd uMsg wParam lParam -- )
|
||||||
|
|
Loading…
Reference in New Issue