fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

rc759: Improve mouse movement reporting

+8 -11
+8 -11
src/arch/rc759/keyboard.c
··· 5 5 /***************************************************************************** 6 6 * File name: src/arch/rc759/keyboard.c * 7 7 * Created: 2012-07-01 by Hampa Hug <hampa@hampa.ch> * 8 - * Copyright: (C) 2012-2021 Hampa Hug <hampa@hampa.ch> * 8 + * Copyright: (C) 2012-2023 Hampa Hug <hampa@hampa.ch> * 9 9 *****************************************************************************/ 10 10 11 11 /***************************************************************************** ··· 15 15 * * 16 16 * This program is distributed in the hope that it will be useful, but * 17 17 * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 19 * Public License for more details. * 20 20 *****************************************************************************/ 21 21 ··· 337 337 kbd->mouse_dx += dx; 338 338 kbd->mouse_dy -= dy; 339 339 kbd->mouse_but[1] = but; 340 - 341 - rc759_kbd_check_mouse (kbd); 342 340 } 343 341 344 342 void rc759_kbd_set_key (rc759_kbd_t *kbd, unsigned event, unsigned key) ··· 409 407 410 408 void rc759_kbd_clock (rc759_kbd_t *kbd, unsigned cnt) 411 409 { 412 - if (kbd->key_i == kbd->key_j) { 413 - return; 414 - } 415 - 416 410 if (kbd->enable == 0) { 417 411 return; 418 412 } ··· 427 421 return; 428 422 } 429 423 430 - kbd->delay = RC759_KBD_DELAY / 100; 424 + if (kbd->key_i == kbd->key_j) { 425 + rc759_kbd_check_mouse (kbd); 426 + return; 427 + } 428 + 429 + kbd->delay = RC759_KBD_DELAY / 250; 431 430 432 431 kbd->key = kbd->key_buf[kbd->key_i]; 433 432 kbd->key_valid = 1; 434 433 435 434 kbd->key_i = (kbd->key_i + 1) % RC759_KBD_BUF; 436 - 437 - rc759_kbd_check_mouse (kbd); 438 435 439 436 rc759_kbd_set_irq (kbd, 1); 440 437 }