Skip to content

Commit

Permalink
further improve pointer motion with analog stick
Browse files Browse the repository at this point in the history
  • Loading branch information
rsn8887 committed Sep 9, 2018
1 parent fe6a372 commit 56fddb6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.MD
Expand Up @@ -283,6 +283,11 @@ Basilisk II Key Codes

Changelog
-----------

0.33g

- further improve pointer motion with analog stick

0.33f

- improve pointer response to diagonal stick directions
Expand Down
8 changes: 4 additions & 4 deletions src/PSP2/video_psp.cpp
Expand Up @@ -1359,11 +1359,11 @@ void VideoInterrupt(void)
}

// mouse
int x = (pad.lx - 128) * 256;
int y = (pad.ly - 128) * 256;
int x = (pad.lx - 127) * 256;
int y = (pad.ly - 127) * 256;
rescaleAnalog(&x, &y, psp_analog_dead);
hires_dx += (int) (x / 16 * psp_pointer_speed_factor);
hires_dy += (int) (y / 16 * psp_pointer_speed_factor);
hires_dx += (int) ((x * psp_pointer_speed_factor) / 16);
hires_dy += (int) ((y * psp_pointer_speed_factor) / 16);
if (hires_dx != 0 || hires_dy != 0) {
int x_rel = hires_dx / 256;
int y_rel = hires_dy / 256;
Expand Down

0 comments on commit 56fddb6

Please sign in to comment.