Skip to content

Commit

Permalink
Merge pull request #4697 from nanshiki/pc98mousearea
Browse files Browse the repository at this point in the history
Fixed PC-98 mouse cursor movement
  • Loading branch information
joncampbell123 authored Dec 22, 2023
2 parents a990302 + d799d39 commit 0ae8cdd
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/hardware/keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2252,14 +2252,8 @@ uint8_t p7fd9_8255_mouse_latch = 0;
uint8_t p7fd8_8255_mouse_int_enable = 0;

void pc98_mouse_movement_apply(int x,int y) {
x += p7fd9_8255_mouse_x;
if (x < -128) x = -128;
if (x > 127) x = 127;
y += p7fd9_8255_mouse_y;
if (y < -128) y = -128;
if (y > 127) y = 127;
p7fd9_8255_mouse_x = (int8_t)x;
p7fd9_8255_mouse_y = (int8_t)y;
p7fd9_8255_mouse_x += x;
p7fd9_8255_mouse_y += y;
}

unsigned int pc98_mouse_rate_hz = 120;
Expand Down

0 comments on commit 0ae8cdd

Please sign in to comment.