Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
hatari
Commits
b00dd664
Commit
b00dd664
authored
Oct 31, 2020
by
bbbradsmith
Browse files
d-pad mouse control should be a bit faster to approximately match analogue movement
parent
c1e01fc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
libretro/hatari-mapper.c
View file @
b00dd664
...
...
@@ -756,13 +756,13 @@ void update_input(void)
//emulate mouse with dpad
if
(
input_state_cb
(
0
,
RETRO_DEVICE_JOYPAD
,
0
,
RETRO_DEVICE_ID_JOYPAD_RIGHT
))
fmousex
+=
PAS
;
fmousex
+=
PAS
*
3
;
if
(
input_state_cb
(
0
,
RETRO_DEVICE_JOYPAD
,
0
,
RETRO_DEVICE_ID_JOYPAD_LEFT
))
fmousex
-=
PAS
;
fmousex
-=
PAS
*
3
;
if
(
input_state_cb
(
0
,
RETRO_DEVICE_JOYPAD
,
0
,
RETRO_DEVICE_ID_JOYPAD_DOWN
))
fmousey
+=
PAS
;
fmousey
+=
PAS
*
3
;
if
(
input_state_cb
(
0
,
RETRO_DEVICE_JOYPAD
,
0
,
RETRO_DEVICE_ID_JOYPAD_UP
))
fmousey
-=
PAS
;
fmousey
-=
PAS
*
3
;
mouse_l
=
input_state_cb
(
0
,
RETRO_DEVICE_JOYPAD
,
0
,
RETRO_DEVICE_ID_JOYPAD_B
);
mouse_r
=
input_state_cb
(
0
,
RETRO_DEVICE_JOYPAD
,
0
,
RETRO_DEVICE_ID_JOYPAD_A
);
...
...
@@ -849,13 +849,13 @@ void input_gui(void)
mouse_y
+=
al
[
1
]
/
1024
;
if
(
input_state_cb
(
0
,
RETRO_DEVICE_JOYPAD
,
0
,
RETRO_DEVICE_ID_JOYPAD_RIGHT
))
mouse_x
+=
PAS
;
mouse_x
+=
PAS
*
3
;
if
(
input_state_cb
(
0
,
RETRO_DEVICE_JOYPAD
,
0
,
RETRO_DEVICE_ID_JOYPAD_LEFT
))
mouse_x
-=
PAS
;
mouse_x
-=
PAS
*
3
;
if
(
input_state_cb
(
0
,
RETRO_DEVICE_JOYPAD
,
0
,
RETRO_DEVICE_ID_JOYPAD_DOWN
))
mouse_y
+=
PAS
;
mouse_y
+=
PAS
*
3
;
if
(
input_state_cb
(
0
,
RETRO_DEVICE_JOYPAD
,
0
,
RETRO_DEVICE_ID_JOYPAD_UP
))
mouse_y
-=
PAS
;
mouse_y
-=
PAS
*
3
;
mouse_l
=
input_state_cb
(
0
,
RETRO_DEVICE_JOYPAD
,
0
,
RETRO_DEVICE_ID_JOYPAD_B
);
mouse_r
=
input_state_cb
(
0
,
RETRO_DEVICE_JOYPAD
,
0
,
RETRO_DEVICE_ID_JOYPAD_A
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment