Closed morozov closed 4 years ago
Hi! 'e' is not 'B' button. It's 'ENTER' on keyboard.
True. With this change, the B
button worked as "up" but the Enter
key stopped working. I only figured that out after submitting the pull request.
In any event, the issue still stays. I solved it temporarily for myself as:
diff --git a/platform/sdl2/sdl2_joystick.cpp b/platform/sdl2/sdl2_joystick.cpp
index c715c94..74154f8 100644
--- a/platform/sdl2/sdl2_joystick.cpp
+++ b/platform/sdl2/sdl2_joystick.cpp
@@ -124,7 +124,7 @@ void ProcessJoy(SDL_Event& e)
ProcessButton(PB_LEFT, pad, pad_prev, 'l');
ProcessButton(PB_RIGHT, pad, pad_prev, 'r');
ProcessButton(PB_A, pad, pad_prev, 'f');
- ProcessButton(PB_B, pad, pad_prev, 'e');
+ ProcessButton(PB_B, pad, pad_prev, 'u');
ProcessButton(PB_X, pad, pad_prev, '1');
ProcessButton(PB_Y, pad, pad_prev, ' ');
ProcessButton(PB_SELECT, pad, pad_prev, 'm');
Could you suggest a valid approach of doing that? I couldn't find any place in the code which would describe all the meanings of 'e'
, '1'
, etc.
You can find all keys here in key_map array. Also 'l', 'r', 'u', 'd', 'f' - mapped to current selected joystick buttons.
You can find all keys here in key_map array. Also 'l', 'r', 'u', 'd', 'f' - mapped to current selected joystick buttons.
So, this way, mapping PB_B
to u
(which is "up" on the joystick) looks like the right thing to do. A
is fire, B
is up. Doesn't it?
Hi!) May be better will be map X button to "up" instead of this ? ProcessButton(PB_X, pad, pad_prev, '1');
May be better will be map X button to "up" instead of this?
Why? In most games I played on NES, A
is "fire", B
is "jump". On Sega, usually B
or C
is "jump". What is special about Enter
that it needs to be mapped to B
?
On the other hand, I have never used X
, Y
and Z
on any console. In my experience, they may have the same meaning as A
, B
and C
respectively but on repeat.
I'm not trying to push my patch. Really trying to understand the motivation behind the current layout.
May be better will be map X button to "up" instead of this?
Why? In most games I played on NES,
A
is "fire",B
is "jump". On Sega, usuallyB
orC
is "jump". What is special aboutEnter
that it needs to be mapped toB
?
I mean to leave ENTER on some button. May be on X instead of "1". Because you removed ENTER (changed to "up").
I'm not trying to push my patch. Really trying to understand the motivation behind the current layout.
It was mapped for Dingoo A320. "1" (X) was mapped for Max Petrov boot from MadROM. But now it's not used because of auto-launch implemented.
I mean to leave ENTER on some button. May be on X instead of "1".
Ah, gotcha! To me, I would expect Enter
to be mapped to something like PB_SELECT
or PB_START
which are currently mapped to m
and k
. What do those symbols mean?
I mean to leave ENTER on some button. May be on X instead of "1".
Ah, gotcha! To me, I would expect
Enter
to be mapped to something likePB_SELECT
orPB_START
which are currently mapped tom
andk
. What do those symbols mean?
'm' means menu, 'k' means virtual keyboard
Done. Please see the update.
Usually, the B button is used as "jump" however it currently acts as "fire". Jumping with the "up" on the vertical axis is not really convenient.