mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
[dos] wheelmouse
This commit is contained in:
parent
064c79433d
commit
126803974a
@ -378,6 +378,7 @@ static void dos_mouse_poll(void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int cx, cy;
|
int cx, cy;
|
||||||
|
char bb;
|
||||||
__dpmi_regs r;
|
__dpmi_regs r;
|
||||||
dos_poll_break();
|
dos_poll_break();
|
||||||
if (dos_mouse_initialized) {
|
if (dos_mouse_initialized) {
|
||||||
@ -419,8 +420,13 @@ px:
|
|||||||
memset(&r, 0, sizeof r);
|
memset(&r, 0, sizeof r);
|
||||||
r.x.ax = 3;
|
r.x.ax = 3;
|
||||||
__dpmi_int(0x33, &r);
|
__dpmi_int(0x33, &r);
|
||||||
|
bb = r.x.bx >> 8;
|
||||||
cx = dos_mouse_coord(r.x.cx);
|
cx = dos_mouse_coord(r.x.cx);
|
||||||
cy = dos_mouse_coord(r.x.dx);
|
cy = dos_mouse_coord(r.x.dx);
|
||||||
|
if (bb) {
|
||||||
|
dos_mouse_enqueue(cx, cy, bb < 0 ? (B_DOWN | B_WHEEL_UP) : (B_DOWN | B_WHEEL_DOWN));
|
||||||
|
goto x;
|
||||||
|
}
|
||||||
if (cx != dos_mouse_last_x || cy != dos_mouse_last_y) {
|
if (cx != dos_mouse_last_x || cy != dos_mouse_last_y) {
|
||||||
for (i = 0; i < dos_mouse_buttons; i++)
|
for (i = 0; i < dos_mouse_buttons; i++)
|
||||||
if (dos_mouse_last_button & (1 << i)) {
|
if (dos_mouse_last_button & (1 << i)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user