-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some buttons in USB controllers won't emit signal #80
Comments
I am trying to debug this and I think I've found the cause, even if I still don't know exactly how to fix. So, we have in the values both 98 and 101 (Y and L2), that is great but.... So, the problem is that TranslateKeyGamepad is trying to get from the array using the key value and not the index for the equivalent key... yeah, I got lost here :-( |
OH, I found it :) KEYCODE_BUTTON_Z = 101, I tried to fix that and add the two buttons, but I was unable without spending a lot of time to change the defines for the keys, and when I got into that part I was aware of breaking things for not knowing what I was doing. |
That explains. Please add these keycodes to
SDL_ANDROID_SetIndividualGamepadKeymap in addition to existing ones
and submit a pull request.
On Nov 21, 2017 11:13 PM, "Iuri Fiedoruk" <notifications@github.com> wrote:
OH, I found it:
C and Z do not exist, they also do not exist on any gamepad I've seen
(PS3/XBox/SHIELD)
KEYCODE_BUTTON_Z = 101,
KEYCODE_BUTTON_C = 98,
:)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJewIqv4Yxm3nNdutybpdgFttbarYu3ks5s4zzsgaJpZM4QjXLg>
.
SDL_ANDROID_SetIndividualGamepadKeymap
|
I've started doing that, but the changes needed are way more greater. I've
stopped when I got into having to change macros and defines :(
Em 21 de nov de 2017 7:56 PM, "Sergii Pylypenko" <notifications@github.com>
escreveu:
That explains. Please add these keycodes to
SDL_ANDROID_SetIndividualGamepadKeymap in addition to existing ones
and submit a pull request.
On Nov 21, 2017 11:13 PM, "Iuri Fiedoruk" <notifications@github.com> wrote:
OH, I found it:
C and Z do not exist, they also do not exist on any gamepad I've seen
(PS3/XBox/SHIELD)
KEYCODE_BUTTON_Z = 101,
KEYCODE_BUTTON_C = 98,
:)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/
AAJewIqv4Yxm3nNdutybpdgFttbarYu3ks5s4zzsgaJpZM4QjXLg>
.
SDL_ANDROID_SetIndividualGamepadKeymap
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPrxHmTer5XqqCGCtqdcec8z54RI9mVks5s40cDgaJpZM4QjXLg>
.
|
Are you trying to increase the key amount in SDL API? I would simply treat
the circle key as another 'start' or 'select' key.
I'll do that myself then. Does L1 button send keycode 98, and circle button
- keycode 101?
On Nov 21, 2017 11:59 PM, "Iuri Fiedoruk" <notifications@github.com> wrote:
I've started doing that, but the changes needed are way more greater. I've
stopped when I got into having to change macros and defines :(
Em 21 de nov de 2017 7:56 PM, "Sergii Pylypenko" <notifications@github.com>
escreveu:
That explains. Please add these keycodes to
SDL_ANDROID_SetIndividualGamepadKeymap in addition to existing ones
and submit a pull request.
On Nov 21, 2017 11:13 PM, "Iuri Fiedoruk" <notifications@github.com> wrote:
OH, I found it:
C and Z do not exist, they also do not exist on any gamepad I've seen
(PS3/XBox/SHIELD)
KEYCODE_BUTTON_Z = 101,
KEYCODE_BUTTON_C = 98,
:)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/
AAJewIqv4Yxm3nNdutybpdgFttbarYu3ks5s4zzsgaJpZM4QjXLg>
.
SDL_ANDROID_SetIndividualGamepadKeymap
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/
ABPrxHmTer5XqqCGCtqdcec8z54RI9mVks5s40cDgaJpZM4QjXLg>
.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJewGbOzzHLYPsPmyK4qhKFtqMEe7RCks5s40esgaJpZM4QjXLg>
.
|
I've tried to add more parameters to the map that sets the keys for C and
Z, but then I had to do the same for the other calls, one one of those used
some values set by #define, I needed more (it goest until number 15, I was
trying to create 16 and 17 to map it). I created the defines, but got lost
when I needed to also set its values with another #defines....
On dualshock4, circle is 98 and R1 is 101.
…--
Iuri Fiedoruk, Software Developer
On Tue, Nov 21, 2017 at 8:05 PM, Sergii Pylypenko <notifications@github.com>
wrote:
Are you trying to increase the key amount in SDL API? I would simply treat
the circle key as another 'start' or 'select' key.
I'll do that myself then. Does L1 button send keycode 98, and circle button
- keycode 101?
On Nov 21, 2017 11:59 PM, "Iuri Fiedoruk" ***@***.***>
wrote:
I've started doing that, but the changes needed are way more greater. I've
stopped when I got into having to change macros and defines :(
Em 21 de nov de 2017 7:56 PM, "Sergii Pylypenko" ***@***.***
>
escreveu:
That explains. Please add these keycodes to
SDL_ANDROID_SetIndividualGamepadKeymap in addition to existing ones
and submit a pull request.
On Nov 21, 2017 11:13 PM, "Iuri Fiedoruk" ***@***.***>
wrote:
OH, I found it:
C and Z do not exist, they also do not exist on any gamepad I've seen
(PS3/XBox/SHIELD)
KEYCODE_BUTTON_Z = 101,
KEYCODE_BUTTON_C = 98,
:)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#80 (comment)
>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/
AAJewIqv4Yxm3nNdutybpdgFttbarYu3ks5s4zzsgaJpZM4QjXLg>
.
SDL_ANDROID_SetIndividualGamepadKeymap
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)
>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/
ABPrxHmTer5XqqCGCtqdcec8z54RI9mVks5s40cDgaJpZM4QjXLg>
.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#80 (comment)
>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/
AAJewGbOzzHLYPsPmyK4qhKFtqMEe7RCks5s40esgaJpZM4QjXLg>
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPrxC8u4DqrnqaBixXUauZ14yemz9RIks5s40kMgaJpZM4QjXLg>
.
|
If there are still only 4 face buttons and 4 shoulder buttons, there's no
point in adding separate keycodes for C and Z keys, they should simply send
the same keycodes as L1 an Y keys. I'll add that to SDL.
BTW I've updated that API, now you can assign keycodes to both analog
joysticks to act as another DPAD, if you do not open them with
SDL_JoystickOpen().
…On Nov 22, 2017 12:08 AM, "Iuri Fiedoruk" ***@***.***> wrote:
I've tried to add more parameters to the map that sets the keys for C and
Z, but then I had to do the same for the other calls, one one of those used
some values set by #define, I needed more (it goest until number 15, I was
trying to create 16 and 17 to map it). I created the defines, but got lost
when I needed to also set its values with another #defines....
On dualshock4, circle is 98 and R1 is 101.
--
Iuri Fiedoruk, Software Developer
On Tue, Nov 21, 2017 at 8:05 PM, Sergii Pylypenko <
***@***.***>
wrote:
> Are you trying to increase the key amount in SDL API? I would simply
treat
> the circle key as another 'start' or 'select' key.
> I'll do that myself then. Does L1 button send keycode 98, and circle
button
> - keycode 101?
>
>
>
> On Nov 21, 2017 11:59 PM, "Iuri Fiedoruk" ***@***.***>
> wrote:
>
> I've started doing that, but the changes needed are way more greater.
I've
> stopped when I got into having to change macros and defines :(
>
> Em 21 de nov de 2017 7:56 PM, "Sergii Pylypenko" <
***@***.***
> >
> escreveu:
>
>
> That explains. Please add these keycodes to
> SDL_ANDROID_SetIndividualGamepadKeymap in addition to existing ones
> and submit a pull request.
>
> On Nov 21, 2017 11:13 PM, "Iuri Fiedoruk" ***@***.***>
> wrote:
>
> OH, I found it:
> C and Z do not exist, they also do not exist on any gamepad I've seen
> (PS3/XBox/SHIELD)
>
> KEYCODE_BUTTON_Z = 101,
> KEYCODE_BUTTON_C = 98,
>
> :)
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346162723
> >,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
> AAJewIqv4Yxm3nNdutybpdgFttbarYu3ks5s4zzsgaJpZM4QjXLg>
> .
>
> SDL_ANDROID_SetIndividualGamepadKeymap
>
> —
> You are receiving this because you authored the thread.
>
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346174146
> >,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
> ABPrxHmTer5XqqCGCtqdcec8z54RI9mVks5s40cDgaJpZM4QjXLg>
> .
>
> —
> You are receiving this because you commented.
>
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346174837
> >,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
> AAJewGbOzzHLYPsPmyK4qhKFtqMEe7RCks5s40esgaJpZM4QjXLg>
> .
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346176359>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
ABPrxC8u4DqrnqaBixXUauZ14yemz9RIks5s40kMgaJpZM4QjXLg>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJewByyEeExKoGoB0yw7ishT5bTIeDHks5s40nHgaJpZM4QjXLg>
.
|
There are more.
X, circle, triangle, square, l1, r1, l2, r2, l3, r3, ps and the touchbar
press.
Em 21 de nov de 2017 8:43 PM, "Sergii Pylypenko" <notifications@github.com>
escreveu:
If there are still only 4 face buttons and 4 shoulder buttons, there's no
point in adding separate keycodes for C and Z keys, they should simply send
the same keycodes as L1 an Y keys. I'll add that to SDL.
BTW I've updated that API, now you can assign keycodes to both analog
joysticks to act as another DPAD, if you do not open them with
SDL_JoystickOpen().
On Nov 22, 2017 12:08 AM, "Iuri Fiedoruk" ***@***.***> wrote:
I've tried to add more parameters to the map that sets the keys for C and
Z, but then I had to do the same for the other calls, one one of those
used
some values set by #define, I needed more (it goest until number 15, I was
trying to create 16 and 17 to map it). I created the defines, but got lost
when I needed to also set its values with another #defines....
On dualshock4, circle is 98 and R1 is 101.
--
Iuri Fiedoruk, Software Developer
On Tue, Nov 21, 2017 at 8:05 PM, Sergii Pylypenko <
***@***.***>
wrote:
> Are you trying to increase the key amount in SDL API? I would simply
treat
> the circle key as another 'start' or 'select' key.
> I'll do that myself then. Does L1 button send keycode 98, and circle
button
> - keycode 101?
>
>
>
> On Nov 21, 2017 11:59 PM, "Iuri Fiedoruk" ***@***.***>
> wrote:
>
> I've started doing that, but the changes needed are way more greater.
I've
> stopped when I got into having to change macros and defines :(
>
> Em 21 de nov de 2017 7:56 PM, "Sergii Pylypenko" <
***@***.***
> >
> escreveu:
>
>
> That explains. Please add these keycodes to
> SDL_ANDROID_SetIndividualGamepadKeymap in addition to existing ones
> and submit a pull request.
>
> On Nov 21, 2017 11:13 PM, "Iuri Fiedoruk" ***@***.***>
> wrote:
>
> OH, I found it:
> C and Z do not exist, they also do not exist on any gamepad I've seen
> (PS3/XBox/SHIELD)
>
> KEYCODE_BUTTON_Z = 101,
> KEYCODE_BUTTON_C = 98,
>
> :)
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346162723
> >,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
> AAJewIqv4Yxm3nNdutybpdgFttbarYu3ks5s4zzsgaJpZM4QjXLg>
> .
>
> SDL_ANDROID_SetIndividualGamepadKeymap
>
> —
> You are receiving this because you authored the thread.
>
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346174146
> >,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
> ABPrxHmTer5XqqCGCtqdcec8z54RI9mVks5s40cDgaJpZM4QjXLg>
> .
>
> —
> You are receiving this because you commented.
>
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346174837
> >,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
> AAJewGbOzzHLYPsPmyK4qhKFtqMEe7RCks5s40esgaJpZM4QjXLg>
> .
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346176359>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
ABPrxC8u4DqrnqaBixXUauZ14yemz9RIks5s40kMgaJpZM4QjXLg>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#80 (comment)
,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/
AAJewByyEeExKoGoB0yw7ishT5bTIeDHks5s40nHgaJpZM4QjXLg>
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPrxA7JDiFz0Oqz9mAAttICg00AlVR5ks5s41ImgaJpZM4QjXLg>
.
|
L3 and R3 buttons are analog stick buttons, they are already in the API as
LThumb and RThumb.
I've been using XBox gamepad as a reference so far, and most Android games
expect 12-button gamepad, if you count two analog stick buttons, Start, and
Select (the big X button is used to power it on, it does not send a
keycode): https://en.wikipedia.org/wiki/Xbox_360_controller
And PS3 controller is the same:
https://en.m.wikipedia.org/wiki/DualShock#DualShock_3
PS4 adds touchpad, but it would make more sense to use it as a mouse input.
I don't have that gamepad so I cannot test it, but a long time ago SDL
supported Xperia Play touchpad.
On Nov 22, 2017 1:21 AM, "Iuri Fiedoruk" <notifications@github.com> wrote:
There are more.
X, circle, triangle, square, l1, r1, l2, r2, l3, r3, ps and the touchbar
press.
Em 21 de nov de 2017 8:43 PM, "Sergii Pylypenko" <notifications@github.com>
escreveu:
If there are still only 4 face buttons and 4 shoulder buttons, there's no
point in adding separate keycodes for C and Z keys, they should simply send
the same keycodes as L1 an Y keys. I'll add that to SDL.
BTW I've updated that API, now you can assign keycodes to both analog
joysticks to act as another DPAD, if you do not open them with
SDL_JoystickOpen().
On Nov 22, 2017 12:08 AM, "Iuri Fiedoruk" ***@***.***> wrote:
I've tried to add more parameters to the map that sets the keys for C and
Z, but then I had to do the same for the other calls, one one of those
used
some values set by #define, I needed more (it goest until number 15, I was
trying to create 16 and 17 to map it). I created the defines, but got lost
when I needed to also set its values with another #defines....
On dualshock4, circle is 98 and R1 is 101.
--
Iuri Fiedoruk, Software Developer
On Tue, Nov 21, 2017 at 8:05 PM, Sergii Pylypenko <
***@***.***>
wrote:
> Are you trying to increase the key amount in SDL API? I would simply
treat
> the circle key as another 'start' or 'select' key.
> I'll do that myself then. Does L1 button send keycode 98, and circle
button
> - keycode 101?
>
>
>
> On Nov 21, 2017 11:59 PM, "Iuri Fiedoruk" ***@***.***>
> wrote:
>
> I've started doing that, but the changes needed are way more greater.
I've
> stopped when I got into having to change macros and defines :(
>
> Em 21 de nov de 2017 7:56 PM, "Sergii Pylypenko" <
***@***.***
> >
> escreveu:
>
>
> That explains. Please add these keycodes to
> SDL_ANDROID_SetIndividualGamepadKeymap in addition to existing ones
> and submit a pull request.
>
> On Nov 21, 2017 11:13 PM, "Iuri Fiedoruk" ***@***.***>
> wrote:
>
> OH, I found it:
> C and Z do not exist, they also do not exist on any gamepad I've seen
> (PS3/XBox/SHIELD)
>
> KEYCODE_BUTTON_Z = 101,
> KEYCODE_BUTTON_C = 98,
>
> :)
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346162723
> >,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
> AAJewIqv4Yxm3nNdutybpdgFttbarYu3ks5s4zzsgaJpZM4QjXLg>
> .
>
> SDL_ANDROID_SetIndividualGamepadKeymap
>
> —
> You are receiving this because you authored the thread.
>
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346174146
> >,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
> ABPrxHmTer5XqqCGCtqdcec8z54RI9mVks5s40cDgaJpZM4QjXLg>
> .
>
> —
> You are receiving this because you commented.
>
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346174837
> >,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
> AAJewGbOzzHLYPsPmyK4qhKFtqMEe7RCks5s40esgaJpZM4QjXLg>
> .
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346176359>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
ABPrxC8u4DqrnqaBixXUauZ14yemz9RIks5s40kMgaJpZM4QjXLg>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#80 (comment)
,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/
AAJewByyEeExKoGoB0yw7ishT5bTIeDHks5s40nHgaJpZM4QjXLg>
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/
ABPrxA7JDiFz0Oqz9mAAttICg00AlVR5ks5s41ImgaJpZM4QjXLg>
.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJewLgRPqROmoZpP3VVa59hz6qymp22ks5s41rogaJpZM4QjXLg>
.
|
The guy that found the issue is using one of those "clip" controls that
attach to the device and plugs in USB port and he have the same issue of
some buttons not being mapped. When using a os2 controller with usb adapter
I also got the problem. It is not only the number of buttons, but the order
that matters, some unimportant ones can work before the ones you want to
use.
That said, why is that you translate gamepads as keyboard inputs to android
sdl instead of just passing it as joysticks to sdl? I think that way you
would not have to worry about the buttons.
Or it is possible to do that and I am just missing something in config?
Em 21 de nov de 2017 10:01 PM, "Sergii Pylypenko" <notifications@github.com>
escreveu:
… L3 and R3 buttons are analog stick buttons, they are already in the API as
LThumb and RThumb.
I've been using XBox gamepad as a reference so far, and most Android games
expect 12-button gamepad, if you count two analog stick buttons, Start, and
Select (the big X button is used to power it on, it does not send a
keycode): https://en.wikipedia.org/wiki/Xbox_360_controller
And PS3 controller is the same:
https://en.m.wikipedia.org/wiki/DualShock#DualShock_3
PS4 adds touchpad, but it would make more sense to use it as a mouse input.
I don't have that gamepad so I cannot test it, but a long time ago SDL
supported Xperia Play touchpad.
On Nov 22, 2017 1:21 AM, "Iuri Fiedoruk" ***@***.***> wrote:
There are more.
X, circle, triangle, square, l1, r1, l2, r2, l3, r3, ps and the touchbar
press.
Em 21 de nov de 2017 8:43 PM, "Sergii Pylypenko" ***@***.***
>
escreveu:
If there are still only 4 face buttons and 4 shoulder buttons, there's no
point in adding separate keycodes for C and Z keys, they should simply send
the same keycodes as L1 an Y keys. I'll add that to SDL.
BTW I've updated that API, now you can assign keycodes to both analog
joysticks to act as another DPAD, if you do not open them with
SDL_JoystickOpen().
On Nov 22, 2017 12:08 AM, "Iuri Fiedoruk" ***@***.***>
wrote:
> I've tried to add more parameters to the map that sets the keys for C and
> Z, but then I had to do the same for the other calls, one one of those
used
> some values set by #define, I needed more (it goest until number 15, I
was
> trying to create 16 and 17 to map it). I created the defines, but got
lost
> when I needed to also set its values with another #defines....
>
> On dualshock4, circle is 98 and R1 is 101.
>
> --
> Iuri Fiedoruk, Software Developer
>
> On Tue, Nov 21, 2017 at 8:05 PM, Sergii Pylypenko <
> ***@***.***>
> wrote:
>
> > Are you trying to increase the key amount in SDL API? I would simply
> treat
> > the circle key as another 'start' or 'select' key.
> > I'll do that myself then. Does L1 button send keycode 98, and circle
> button
> > - keycode 101?
> >
> >
> >
> > On Nov 21, 2017 11:59 PM, "Iuri Fiedoruk" ***@***.***>
> > wrote:
> >
> > I've started doing that, but the changes needed are way more greater.
> I've
> > stopped when I got into having to change macros and defines :(
> >
> > Em 21 de nov de 2017 7:56 PM, "Sergii Pylypenko" <
> ***@***.***
> > >
> > escreveu:
> >
> >
> > That explains. Please add these keycodes to
> > SDL_ANDROID_SetIndividualGamepadKeymap in addition to existing ones
> > and submit a pull request.
> >
> > On Nov 21, 2017 11:13 PM, "Iuri Fiedoruk" ***@***.***>
> > wrote:
> >
> > OH, I found it:
> > C and Z do not exist, they also do not exist on any gamepad I've seen
> > (PS3/XBox/SHIELD)
> >
> > KEYCODE_BUTTON_Z = 101,
> > KEYCODE_BUTTON_C = 98,
> >
> > :)
> >
> > —
> > You are receiving this because you are subscribed to this thread.
> > Reply to this email directly, view it on GitHub
> > <#80#
> issuecomment-346162723
> > >,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/
> > AAJewIqv4Yxm3nNdutybpdgFttbarYu3ks5s4zzsgaJpZM4QjXLg>
> > .
> >
> > SDL_ANDROID_SetIndividualGamepadKeymap
> >
> > —
> > You are receiving this because you authored the thread.
> >
> > Reply to this email directly, view it on GitHub
> > <#80#
> issuecomment-346174146
> > >,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/
> > ABPrxHmTer5XqqCGCtqdcec8z54RI9mVks5s40cDgaJpZM4QjXLg>
> > .
> >
> > —
> > You are receiving this because you commented.
> >
> > Reply to this email directly, view it on GitHub
> > <#80#
> issuecomment-346174837
> > >,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/
> > AAJewGbOzzHLYPsPmyK4qhKFtqMEe7RCks5s40esgaJpZM4QjXLg>
> > .
> >
> > —
> > You are receiving this because you authored the thread.
> > Reply to this email directly, view it on GitHub
> > <#80#
> issuecomment-346176359>,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/
> ABPrxC8u4DqrnqaBixXUauZ14yemz9RIks5s40kMgaJpZM4QjXLg>
> > .
> >
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346177106
>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AAJewByyEeExKoGoB0yw7ishT5bTIeDHks5s40nHgaJpZM4QjXLg>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)
>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/
ABPrxA7JDiFz0Oqz9mAAttICg00AlVR5ks5s41ImgaJpZM4QjXLg>
.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#80 (comment)
>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/
AAJewLgRPqROmoZpP3VVa59hz6qymp22ks5s41rogaJpZM4QjXLg>
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPrxGu9pLOxGsiYA-N6XfNymWoynmbqks5s42RzgaJpZM4QjXLg>
.
|
Oh, and the touchpad on dualshock controller works as a button, it can be
pressed, much like ones in notebooks.
Also, when plugging the dualshock4, sound stops, as if android tries to use
its little speaker as output. But this does not worry me, just FYI.
Em 21 de nov de 2017 10:11 PM, "Iuri Fiedoruk" <protoman@upperland.net>
escreveu:
… The guy that found the issue is using one of those "clip" controls that
attach to the device and plugs in USB port and he have the same issue of
some buttons not being mapped. When using a os2 controller with usb adapter
I also got the problem. It is not only the number of buttons, but the order
that matters, some unimportant ones can work before the ones you want to
use.
That said, why is that you translate gamepads as keyboard inputs to
android sdl instead of just passing it as joysticks to sdl? I think that
way you would not have to worry about the buttons.
Or it is possible to do that and I am just missing something in config?
Em 21 de nov de 2017 10:01 PM, "Sergii Pylypenko" <
***@***.***> escreveu:
> L3 and R3 buttons are analog stick buttons, they are already in the API as
> LThumb and RThumb.
>
> I've been using XBox gamepad as a reference so far, and most Android games
> expect 12-button gamepad, if you count two analog stick buttons, Start,
> and
> Select (the big X button is used to power it on, it does not send a
> keycode): https://en.wikipedia.org/wiki/Xbox_360_controller
>
> And PS3 controller is the same:
> https://en.m.wikipedia.org/wiki/DualShock#DualShock_3
>
> PS4 adds touchpad, but it would make more sense to use it as a mouse
> input.
> I don't have that gamepad so I cannot test it, but a long time ago SDL
> supported Xperia Play touchpad.
>
> On Nov 22, 2017 1:21 AM, "Iuri Fiedoruk" ***@***.***>
> wrote:
>
> There are more.
> X, circle, triangle, square, l1, r1, l2, r2, l3, r3, ps and the touchbar
> press.
>
>
> Em 21 de nov de 2017 8:43 PM, "Sergii Pylypenko" <
> ***@***.***>
>
> escreveu:
>
> If there are still only 4 face buttons and 4 shoulder buttons, there's no
> point in adding separate keycodes for C and Z keys, they should simply
> send
> the same keycodes as L1 an Y keys. I'll add that to SDL.
>
> BTW I've updated that API, now you can assign keycodes to both analog
> joysticks to act as another DPAD, if you do not open them with
> SDL_JoystickOpen().
>
>
> On Nov 22, 2017 12:08 AM, "Iuri Fiedoruk" ***@***.***>
> wrote:
>
> > I've tried to add more parameters to the map that sets the keys for C
> and
> > Z, but then I had to do the same for the other calls, one one of those
> used
> > some values set by #define, I needed more (it goest until number 15, I
> was
> > trying to create 16 and 17 to map it). I created the defines, but got
> lost
> > when I needed to also set its values with another #defines....
> >
> > On dualshock4, circle is 98 and R1 is 101.
> >
> > --
> > Iuri Fiedoruk, Software Developer
> >
> > On Tue, Nov 21, 2017 at 8:05 PM, Sergii Pylypenko <
> > ***@***.***>
> > wrote:
> >
> > > Are you trying to increase the key amount in SDL API? I would simply
> > treat
> > > the circle key as another 'start' or 'select' key.
> > > I'll do that myself then. Does L1 button send keycode 98, and circle
> > button
> > > - keycode 101?
> > >
> > >
> > >
> > > On Nov 21, 2017 11:59 PM, "Iuri Fiedoruk" ***@***.***>
> > > wrote:
> > >
> > > I've started doing that, but the changes needed are way more greater.
> > I've
> > > stopped when I got into having to change macros and defines :(
> > >
> > > Em 21 de nov de 2017 7:56 PM, "Sergii Pylypenko" <
> > ***@***.***
> > > >
> > > escreveu:
> > >
> > >
> > > That explains. Please add these keycodes to
> > > SDL_ANDROID_SetIndividualGamepadKeymap in addition to existing ones
> > > and submit a pull request.
> > >
> > > On Nov 21, 2017 11:13 PM, "Iuri Fiedoruk" ***@***.***>
> > > wrote:
> > >
> > > OH, I found it:
> > > C and Z do not exist, they also do not exist on any gamepad I've seen
> > > (PS3/XBox/SHIELD)
> > >
> > > KEYCODE_BUTTON_Z = 101,
> > > KEYCODE_BUTTON_C = 98,
> > >
> > > :)
> > >
> > > —
> > > You are receiving this because you are subscribed to this thread.
> > > Reply to this email directly, view it on GitHub
> > > <#80#
>
> > issuecomment-346162723
> > > >,
> > > or mute the thread
> > > <https://github.com/notifications/unsubscribe-auth/
> > > AAJewIqv4Yxm3nNdutybpdgFttbarYu3ks5s4zzsgaJpZM4QjXLg>
> > > .
> > >
> > > SDL_ANDROID_SetIndividualGamepadKeymap
> > >
> > > —
> > > You are receiving this because you authored the thread.
>
> > >
> > > Reply to this email directly, view it on GitHub
> > > <#80#
>
> > issuecomment-346174146
> > > >,
> > > or mute the thread
> > > <https://github.com/notifications/unsubscribe-auth/
> > > ABPrxHmTer5XqqCGCtqdcec8z54RI9mVks5s40cDgaJpZM4QjXLg>
> > > .
> > >
> > > —
> > > You are receiving this because you commented.
>
> > >
> > > Reply to this email directly, view it on GitHub
> > > <#80#
>
> > issuecomment-346174837
> > > >,
> > > or mute the thread
> > > <https://github.com/notifications/unsubscribe-auth/
> > > AAJewGbOzzHLYPsPmyK4qhKFtqMEe7RCks5s40esgaJpZM4QjXLg>
> > > .
> > >
> > > —
> > > You are receiving this because you authored the thread.
>
> > > Reply to this email directly, view it on GitHub
> > > <#80#
> > issuecomment-346176359>,
>
>
> > > or mute the thread
> > > <https://github.com/notifications/unsubscribe-auth/
> > ABPrxC8u4DqrnqaBixXUauZ14yemz9RIks5s40kMgaJpZM4QjXLg>
>
> > > .
> > >
> >
> > —
> > You are receiving this because you commented.
>
> > Reply to this email directly, view it on GitHub
> > <#80 (comment)
> ment-346177106
>
> >,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/
> AAJewByyEeExKoGoB0yw7ishT5bTIeDHks5s40nHgaJpZM4QjXLg>
>
> > .
> >
>
> —
> You are receiving this because you authored the thread.
>
> Reply to this email directly, view it on GitHub
> <#80 (comment)
> ment-346185735>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
> ABPrxA7JDiFz0Oqz9mAAttICg00AlVR5ks5s41ImgaJpZM4QjXLg>
> .
>
> —
> You are receiving this because you commented.
>
> Reply to this email directly, view it on GitHub
> <#80 (comment)
> ment-346193479>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAJewLgRP
> qROmoZpP3VVa59hz6qymp22ks5s41rogaJpZM4QjXLg>
> .
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#80 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABPrxGu9pLOxGsiYA-N6XfNymWoynmbqks5s42RzgaJpZM4QjXLg>
> .
>
|
This SDL port is mostly used to port opensource Linux games to Android,
most of them support keyboard really well, but joystick input requires some
additional code.
Mapping gamepad buttons to keypresses just makes it easier to port.
I did plan to provide API through SDL_JoyButtonEvent, but did not implement
it yet.
…On Nov 22, 2017 2:13 AM, "Iuri Fiedoruk" ***@***.***> wrote:
Oh, and the touchpad on dualshock controller works as a button, it can be
pressed, much like ones in notebooks.
Also, when plugging the dualshock4, sound stops, as if android tries to use
its little speaker as output. But this does not worry me, just FYI.
Em 21 de nov de 2017 10:11 PM, "Iuri Fiedoruk" ***@***.***>
escreveu:
> The guy that found the issue is using one of those "clip" controls that
> attach to the device and plugs in USB port and he have the same issue of
> some buttons not being mapped. When using a os2 controller with usb
adapter
> I also got the problem. It is not only the number of buttons, but the
order
> that matters, some unimportant ones can work before the ones you want to
> use.
>
> That said, why is that you translate gamepads as keyboard inputs to
> android sdl instead of just passing it as joysticks to sdl? I think that
> way you would not have to worry about the buttons.
> Or it is possible to do that and I am just missing something in config?
>
> Em 21 de nov de 2017 10:01 PM, "Sergii Pylypenko" <
> ***@***.***> escreveu:
>
>> L3 and R3 buttons are analog stick buttons, they are already in the API
as
>> LThumb and RThumb.
>>
>> I've been using XBox gamepad as a reference so far, and most Android
games
>> expect 12-button gamepad, if you count two analog stick buttons, Start,
>> and
>> Select (the big X button is used to power it on, it does not send a
>> keycode): https://en.wikipedia.org/wiki/Xbox_360_controller
>>
>> And PS3 controller is the same:
>> https://en.m.wikipedia.org/wiki/DualShock#DualShock_3
>>
>> PS4 adds touchpad, but it would make more sense to use it as a mouse
>> input.
>> I don't have that gamepad so I cannot test it, but a long time ago SDL
>> supported Xperia Play touchpad.
>>
>> On Nov 22, 2017 1:21 AM, "Iuri Fiedoruk" ***@***.***>
>> wrote:
>>
>> There are more.
>> X, circle, triangle, square, l1, r1, l2, r2, l3, r3, ps and the touchbar
>> press.
>>
>>
>> Em 21 de nov de 2017 8:43 PM, "Sergii Pylypenko" <
>> ***@***.***>
>>
>> escreveu:
>>
>> If there are still only 4 face buttons and 4 shoulder buttons, there's
no
>> point in adding separate keycodes for C and Z keys, they should simply
>> send
>> the same keycodes as L1 an Y keys. I'll add that to SDL.
>>
>> BTW I've updated that API, now you can assign keycodes to both analog
>> joysticks to act as another DPAD, if you do not open them with
>> SDL_JoystickOpen().
>>
>>
>> On Nov 22, 2017 12:08 AM, "Iuri Fiedoruk" ***@***.***>
>> wrote:
>>
>> > I've tried to add more parameters to the map that sets the keys for C
>> and
>> > Z, but then I had to do the same for the other calls, one one of those
>> used
>> > some values set by #define, I needed more (it goest until number 15, I
>> was
>> > trying to create 16 and 17 to map it). I created the defines, but got
>> lost
>> > when I needed to also set its values with another #defines....
>> >
>> > On dualshock4, circle is 98 and R1 is 101.
>> >
>> > --
>> > Iuri Fiedoruk, Software Developer
>> >
>> > On Tue, Nov 21, 2017 at 8:05 PM, Sergii Pylypenko <
>> > ***@***.***>
>> > wrote:
>> >
>> > > Are you trying to increase the key amount in SDL API? I would simply
>> > treat
>> > > the circle key as another 'start' or 'select' key.
>> > > I'll do that myself then. Does L1 button send keycode 98, and circle
>> > button
>> > > - keycode 101?
>> > >
>> > >
>> > >
>> > > On Nov 21, 2017 11:59 PM, "Iuri Fiedoruk" ***@***.***
>
>> > > wrote:
>> > >
>> > > I've started doing that, but the changes needed are way more
greater.
>> > I've
>> > > stopped when I got into having to change macros and defines :(
>> > >
>> > > Em 21 de nov de 2017 7:56 PM, "Sergii Pylypenko" <
>> > ***@***.***
>> > > >
>> > > escreveu:
>> > >
>> > >
>> > > That explains. Please add these keycodes to
>> > > SDL_ANDROID_SetIndividualGamepadKeymap in addition to existing ones
>> > > and submit a pull request.
>> > >
>> > > On Nov 21, 2017 11:13 PM, "Iuri Fiedoruk" ***@***.***
>
>> > > wrote:
>> > >
>> > > OH, I found it:
>> > > C and Z do not exist, they also do not exist on any gamepad I've
seen
>> > > (PS3/XBox/SHIELD)
>> > >
>> > > KEYCODE_BUTTON_Z = 101,
>> > > KEYCODE_BUTTON_C = 98,
>> > >
>> > > :)
>> > >
>> > > —
>> > > You are receiving this because you are subscribed to this thread.
>> > > Reply to this email directly, view it on GitHub
>> > > <#80#
>>
>> > issuecomment-346162723
>> > > >,
>> > > or mute the thread
>> > > <https://github.com/notifications/unsubscribe-auth/
>> > > AAJewIqv4Yxm3nNdutybpdgFttbarYu3ks5s4zzsgaJpZM4QjXLg>
>> > > .
>> > >
>> > > SDL_ANDROID_SetIndividualGamepadKeymap
>> > >
>> > > —
>> > > You are receiving this because you authored the thread.
>>
>> > >
>> > > Reply to this email directly, view it on GitHub
>> > > <#80#
>>
>> > issuecomment-346174146
>> > > >,
>> > > or mute the thread
>> > > <https://github.com/notifications/unsubscribe-auth/
>> > > ABPrxHmTer5XqqCGCtqdcec8z54RI9mVks5s40cDgaJpZM4QjXLg>
>> > > .
>> > >
>> > > —
>> > > You are receiving this because you commented.
>>
>> > >
>> > > Reply to this email directly, view it on GitHub
>> > > <#80#
>>
>> > issuecomment-346174837
>> > > >,
>> > > or mute the thread
>> > > <https://github.com/notifications/unsubscribe-auth/
>> > > AAJewGbOzzHLYPsPmyK4qhKFtqMEe7RCks5s40esgaJpZM4QjXLg>
>> > > .
>> > >
>> > > —
>> > > You are receiving this because you authored the thread.
>>
>> > > Reply to this email directly, view it on GitHub
>> > > <#80#
>> > issuecomment-346176359>,
>>
>>
>> > > or mute the thread
>> > > <https://github.com/notifications/unsubscribe-auth/
>> > ABPrxC8u4DqrnqaBixXUauZ14yemz9RIks5s40kMgaJpZM4QjXLg>
>>
>> > > .
>> > >
>> >
>> > —
>> > You are receiving this because you commented.
>>
>> > Reply to this email directly, view it on GitHub
>> > <#80 (comment)
>> ment-346177106
>>
>> >,
>> > or mute the thread
>> > <https://github.com/notifications/unsubscribe-auth/
>> AAJewByyEeExKoGoB0yw7ishT5bTIeDHks5s40nHgaJpZM4QjXLg>
>>
>> > .
>> >
>>
>> —
>> You are receiving this because you authored the thread.
>>
>> Reply to this email directly, view it on GitHub
>> <#80 (comment)
>> ment-346185735>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/
>> ABPrxA7JDiFz0Oqz9mAAttICg00AlVR5ks5s41ImgaJpZM4QjXLg>
>> .
>>
>> —
>> You are receiving this because you commented.
>>
>> Reply to this email directly, view it on GitHub
>> <#80 (comment)
>> ment-346193479>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/AAJewLgRP
>> qROmoZpP3VVa59hz6qymp22ks5s41rogaJpZM4QjXLg>
>> .
>>
>> —
>> You are receiving this because you authored the thread.
>> Reply to this email directly, view it on GitHub
>> <#80#
issuecomment-346200547>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/ABPrxGu9pLOxGsiYA-
N6XfNymWoynmbqks5s42RzgaJpZM4QjXLg>
>> .
>>
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJewBtdU0MZrn1iDqnI9XJrvF199yCeks5s42dAgaJpZM4QjXLg>
.
|
How do you handle the analog sticks and buttons? I'm guessing it is not
variable if it requires maps to keypresses. Sorry know this isn't related
to the issue but just curious.
On Nov 21, 2017 10:24 PM, "Sergii Pylypenko" <notifications@github.com>
wrote:
… This SDL port is mostly used to port opensource Linux games to Android,
most of them support keyboard really well, but joystick input requires some
additional code.
Mapping gamepad buttons to keypresses just makes it easier to port.
I did plan to provide API through SDL_JoyButtonEvent, but did not implement
it yet.
On Nov 22, 2017 2:13 AM, "Iuri Fiedoruk" ***@***.***> wrote:
> Oh, and the touchpad on dualshock controller works as a button, it can be
> pressed, much like ones in notebooks.
>
> Also, when plugging the dualshock4, sound stops, as if android tries to
use
> its little speaker as output. But this does not worry me, just FYI.
>
> Em 21 de nov de 2017 10:11 PM, "Iuri Fiedoruk" ***@***.***>
> escreveu:
>
> > The guy that found the issue is using one of those "clip" controls that
> > attach to the device and plugs in USB port and he have the same issue
of
> > some buttons not being mapped. When using a os2 controller with usb
> adapter
> > I also got the problem. It is not only the number of buttons, but the
> order
> > that matters, some unimportant ones can work before the ones you want
to
> > use.
> >
> > That said, why is that you translate gamepads as keyboard inputs to
> > android sdl instead of just passing it as joysticks to sdl? I think
that
> > way you would not have to worry about the buttons.
> > Or it is possible to do that and I am just missing something in config?
> >
> > Em 21 de nov de 2017 10:01 PM, "Sergii Pylypenko" <
> > ***@***.***> escreveu:
> >
> >> L3 and R3 buttons are analog stick buttons, they are already in the
API
> as
> >> LThumb and RThumb.
> >>
> >> I've been using XBox gamepad as a reference so far, and most Android
> games
> >> expect 12-button gamepad, if you count two analog stick buttons,
Start,
> >> and
> >> Select (the big X button is used to power it on, it does not send a
> >> keycode): https://en.wikipedia.org/wiki/Xbox_360_controller
> >>
> >> And PS3 controller is the same:
> >> https://en.m.wikipedia.org/wiki/DualShock#DualShock_3
> >>
> >> PS4 adds touchpad, but it would make more sense to use it as a mouse
> >> input.
> >> I don't have that gamepad so I cannot test it, but a long time ago SDL
> >> supported Xperia Play touchpad.
> >>
> >> On Nov 22, 2017 1:21 AM, "Iuri Fiedoruk" ***@***.***>
> >> wrote:
> >>
> >> There are more.
> >> X, circle, triangle, square, l1, r1, l2, r2, l3, r3, ps and the
touchbar
> >> press.
> >>
> >>
> >> Em 21 de nov de 2017 8:43 PM, "Sergii Pylypenko" <
> >> ***@***.***>
> >>
> >> escreveu:
> >>
> >> If there are still only 4 face buttons and 4 shoulder buttons, there's
> no
> >> point in adding separate keycodes for C and Z keys, they should simply
> >> send
> >> the same keycodes as L1 an Y keys. I'll add that to SDL.
> >>
> >> BTW I've updated that API, now you can assign keycodes to both analog
> >> joysticks to act as another DPAD, if you do not open them with
> >> SDL_JoystickOpen().
> >>
> >>
> >> On Nov 22, 2017 12:08 AM, "Iuri Fiedoruk" ***@***.***>
> >> wrote:
> >>
> >> > I've tried to add more parameters to the map that sets the keys for
C
> >> and
> >> > Z, but then I had to do the same for the other calls, one one of
those
> >> used
> >> > some values set by #define, I needed more (it goest until number
15, I
> >> was
> >> > trying to create 16 and 17 to map it). I created the defines, but
got
> >> lost
> >> > when I needed to also set its values with another #defines....
> >> >
> >> > On dualshock4, circle is 98 and R1 is 101.
> >> >
> >> > --
> >> > Iuri Fiedoruk, Software Developer
> >> >
> >> > On Tue, Nov 21, 2017 at 8:05 PM, Sergii Pylypenko <
> >> > ***@***.***>
> >> > wrote:
> >> >
> >> > > Are you trying to increase the key amount in SDL API? I would
simply
> >> > treat
> >> > > the circle key as another 'start' or 'select' key.
> >> > > I'll do that myself then. Does L1 button send keycode 98, and
circle
> >> > button
> >> > > - keycode 101?
> >> > >
> >> > >
> >> > >
> >> > > On Nov 21, 2017 11:59 PM, "Iuri Fiedoruk" <
***@***.***
> >
> >> > > wrote:
> >> > >
> >> > > I've started doing that, but the changes needed are way more
> greater.
> >> > I've
> >> > > stopped when I got into having to change macros and defines :(
> >> > >
> >> > > Em 21 de nov de 2017 7:56 PM, "Sergii Pylypenko" <
> >> > ***@***.***
> >> > > >
> >> > > escreveu:
> >> > >
> >> > >
> >> > > That explains. Please add these keycodes to
> >> > > SDL_ANDROID_SetIndividualGamepadKeymap in addition to existing
ones
> >> > > and submit a pull request.
> >> > >
> >> > > On Nov 21, 2017 11:13 PM, "Iuri Fiedoruk" <
***@***.***
> >
> >> > > wrote:
> >> > >
> >> > > OH, I found it:
> >> > > C and Z do not exist, they also do not exist on any gamepad I've
> seen
> >> > > (PS3/XBox/SHIELD)
> >> > >
> >> > > KEYCODE_BUTTON_Z = 101,
> >> > > KEYCODE_BUTTON_C = 98,
> >> > >
> >> > > :)
> >> > >
> >> > > —
> >> > > You are receiving this because you are subscribed to this thread.
> >> > > Reply to this email directly, view it on GitHub
> >> > > <#80#
> >>
> >> > issuecomment-346162723
> >> > > >,
> >> > > or mute the thread
> >> > > <https://github.com/notifications/unsubscribe-auth/
> >> > > AAJewIqv4Yxm3nNdutybpdgFttbarYu3ks5s4zzsgaJpZM4QjXLg>
> >> > > .
> >> > >
> >> > > SDL_ANDROID_SetIndividualGamepadKeymap
> >> > >
> >> > > —
> >> > > You are receiving this because you authored the thread.
> >>
> >> > >
> >> > > Reply to this email directly, view it on GitHub
> >> > > <#80#
> >>
> >> > issuecomment-346174146
> >> > > >,
> >> > > or mute the thread
> >> > > <https://github.com/notifications/unsubscribe-auth/
> >> > > ABPrxHmTer5XqqCGCtqdcec8z54RI9mVks5s40cDgaJpZM4QjXLg>
> >> > > .
> >> > >
> >> > > —
> >> > > You are receiving this because you commented.
> >>
> >> > >
> >> > > Reply to this email directly, view it on GitHub
> >> > > <#80#
> >>
> >> > issuecomment-346174837
> >> > > >,
> >> > > or mute the thread
> >> > > <https://github.com/notifications/unsubscribe-auth/
> >> > > AAJewGbOzzHLYPsPmyK4qhKFtqMEe7RCks5s40esgaJpZM4QjXLg>
> >> > > .
> >> > >
> >> > > —
> >> > > You are receiving this because you authored the thread.
> >>
> >> > > Reply to this email directly, view it on GitHub
> >> > > <#80#
> >> > issuecomment-346176359>,
> >>
> >>
> >> > > or mute the thread
> >> > > <https://github.com/notifications/unsubscribe-auth/
> >> > ABPrxC8u4DqrnqaBixXUauZ14yemz9RIks5s40kMgaJpZM4QjXLg>
> >>
> >> > > .
> >> > >
> >> >
> >> > —
> >> > You are receiving this because you commented.
> >>
> >> > Reply to this email directly, view it on GitHub
> >> > <#80 (comment)
> >> ment-346177106
> >>
> >> >,
> >> > or mute the thread
> >> > <https://github.com/notifications/unsubscribe-auth/
> >> AAJewByyEeExKoGoB0yw7ishT5bTIeDHks5s40nHgaJpZM4QjXLg>
> >>
> >> > .
> >> >
> >>
> >> —
> >> You are receiving this because you authored the thread.
> >>
> >> Reply to this email directly, view it on GitHub
> >> <#80 (comment)
> >> ment-346185735>,
> >> or mute the thread
> >> <https://github.com/notifications/unsubscribe-auth/
> >> ABPrxA7JDiFz0Oqz9mAAttICg00AlVR5ks5s41ImgaJpZM4QjXLg>
> >> .
> >>
> >> —
> >> You are receiving this because you commented.
> >>
> >> Reply to this email directly, view it on GitHub
> >> <#80 (comment)
> >> ment-346193479>,
> >> or mute the thread
> >> <https://github.com/notifications/unsubscribe-auth/AAJewLgRP
> >> qROmoZpP3VVa59hz6qymp22ks5s41rogaJpZM4QjXLg>
> >> .
> >>
> >> —
> >> You are receiving this because you authored the thread.
> >> Reply to this email directly, view it on GitHub
> >> <#80#
> issuecomment-346200547>,
> >> or mute the thread
> >> <https://github.com/notifications/unsubscribe-auth/ABPrxGu9pLOxGsiYA-
> N6XfNymWoynmbqks5s42RzgaJpZM4QjXLg>
> >> .
> >>
> >
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346202547>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AAJewBtdU0MZrn1iDqnI9XJrvF199yCeks5s42dAgaJpZM4QjXLg>
> .
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AM1jGituCdVh4fP5AzyN8J_q_mk6Tih5ks5s45P1gaJpZM4QjXLg>
.
|
A bit information on the gamepad that also misses some buttons events:
It a generic gamepad, PS Bluetooth clone by a Polish company (made in China
of course).
The company name is MANTA.
Gamepad model: MM824
The gamepad is designed to operate with Android and iOS but also Windows.
It has three emulation/working modes: normal gamepad mode, keyboard
emulation and mouse emulation - right analog controls the mouse pointer.
The gamepad has an internal power supply of DC 3.7V, 180mA.
Em 22 de nov de 2017 1:24 AM, "Sergii Pylypenko" <notifications@github.com>
escreveu:
… This SDL port is mostly used to port opensource Linux games to Android,
most of them support keyboard really well, but joystick input requires some
additional code.
Mapping gamepad buttons to keypresses just makes it easier to port.
I did plan to provide API through SDL_JoyButtonEvent, but did not implement
it yet.
On Nov 22, 2017 2:13 AM, "Iuri Fiedoruk" ***@***.***> wrote:
> Oh, and the touchpad on dualshock controller works as a button, it can be
> pressed, much like ones in notebooks.
>
> Also, when plugging the dualshock4, sound stops, as if android tries to
use
> its little speaker as output. But this does not worry me, just FYI.
>
> Em 21 de nov de 2017 10:11 PM, "Iuri Fiedoruk" ***@***.***>
> escreveu:
>
> > The guy that found the issue is using one of those "clip" controls that
> > attach to the device and plugs in USB port and he have the same issue
of
> > some buttons not being mapped. When using a os2 controller with usb
> adapter
> > I also got the problem. It is not only the number of buttons, but the
> order
> > that matters, some unimportant ones can work before the ones you want
to
> > use.
> >
> > That said, why is that you translate gamepads as keyboard inputs to
> > android sdl instead of just passing it as joysticks to sdl? I think
that
> > way you would not have to worry about the buttons.
> > Or it is possible to do that and I am just missing something in config?
> >
> > Em 21 de nov de 2017 10:01 PM, "Sergii Pylypenko" <
> > ***@***.***> escreveu:
> >
> >> L3 and R3 buttons are analog stick buttons, they are already in the
API
> as
> >> LThumb and RThumb.
> >>
> >> I've been using XBox gamepad as a reference so far, and most Android
> games
> >> expect 12-button gamepad, if you count two analog stick buttons,
Start,
> >> and
> >> Select (the big X button is used to power it on, it does not send a
> >> keycode): https://en.wikipedia.org/wiki/Xbox_360_controller
> >>
> >> And PS3 controller is the same:
> >> https://en.m.wikipedia.org/wiki/DualShock#DualShock_3
> >>
> >> PS4 adds touchpad, but it would make more sense to use it as a mouse
> >> input.
> >> I don't have that gamepad so I cannot test it, but a long time ago SDL
> >> supported Xperia Play touchpad.
> >>
> >> On Nov 22, 2017 1:21 AM, "Iuri Fiedoruk" ***@***.***>
> >> wrote:
> >>
> >> There are more.
> >> X, circle, triangle, square, l1, r1, l2, r2, l3, r3, ps and the
touchbar
> >> press.
> >>
> >>
> >> Em 21 de nov de 2017 8:43 PM, "Sergii Pylypenko" <
> >> ***@***.***>
> >>
> >> escreveu:
> >>
> >> If there are still only 4 face buttons and 4 shoulder buttons, there's
> no
> >> point in adding separate keycodes for C and Z keys, they should simply
> >> send
> >> the same keycodes as L1 an Y keys. I'll add that to SDL.
> >>
> >> BTW I've updated that API, now you can assign keycodes to both analog
> >> joysticks to act as another DPAD, if you do not open them with
> >> SDL_JoystickOpen().
> >>
> >>
> >> On Nov 22, 2017 12:08 AM, "Iuri Fiedoruk" ***@***.***>
> >> wrote:
> >>
> >> > I've tried to add more parameters to the map that sets the keys for
C
> >> and
> >> > Z, but then I had to do the same for the other calls, one one of
those
> >> used
> >> > some values set by #define, I needed more (it goest until number
15, I
> >> was
> >> > trying to create 16 and 17 to map it). I created the defines, but
got
> >> lost
> >> > when I needed to also set its values with another #defines....
> >> >
> >> > On dualshock4, circle is 98 and R1 is 101.
> >> >
> >> > --
> >> > Iuri Fiedoruk, Software Developer
> >> >
> >> > On Tue, Nov 21, 2017 at 8:05 PM, Sergii Pylypenko <
> >> > ***@***.***>
> >> > wrote:
> >> >
> >> > > Are you trying to increase the key amount in SDL API? I would
simply
> >> > treat
> >> > > the circle key as another 'start' or 'select' key.
> >> > > I'll do that myself then. Does L1 button send keycode 98, and
circle
> >> > button
> >> > > - keycode 101?
> >> > >
> >> > >
> >> > >
> >> > > On Nov 21, 2017 11:59 PM, "Iuri Fiedoruk" <
***@***.***
> >
> >> > > wrote:
> >> > >
> >> > > I've started doing that, but the changes needed are way more
> greater.
> >> > I've
> >> > > stopped when I got into having to change macros and defines :(
> >> > >
> >> > > Em 21 de nov de 2017 7:56 PM, "Sergii Pylypenko" <
> >> > ***@***.***
> >> > > >
> >> > > escreveu:
> >> > >
> >> > >
> >> > > That explains. Please add these keycodes to
> >> > > SDL_ANDROID_SetIndividualGamepadKeymap in addition to existing
ones
> >> > > and submit a pull request.
> >> > >
> >> > > On Nov 21, 2017 11:13 PM, "Iuri Fiedoruk" <
***@***.***
> >
> >> > > wrote:
> >> > >
> >> > > OH, I found it:
> >> > > C and Z do not exist, they also do not exist on any gamepad I've
> seen
> >> > > (PS3/XBox/SHIELD)
> >> > >
> >> > > KEYCODE_BUTTON_Z = 101,
> >> > > KEYCODE_BUTTON_C = 98,
> >> > >
> >> > > :)
> >> > >
> >> > > —
> >> > > You are receiving this because you are subscribed to this thread.
> >> > > Reply to this email directly, view it on GitHub
> >> > > <#80#
> >>
> >> > issuecomment-346162723
> >> > > >,
> >> > > or mute the thread
> >> > > <https://github.com/notifications/unsubscribe-auth/
> >> > > AAJewIqv4Yxm3nNdutybpdgFttbarYu3ks5s4zzsgaJpZM4QjXLg>
> >> > > .
> >> > >
> >> > > SDL_ANDROID_SetIndividualGamepadKeymap
> >> > >
> >> > > —
> >> > > You are receiving this because you authored the thread.
> >>
> >> > >
> >> > > Reply to this email directly, view it on GitHub
> >> > > <#80#
> >>
> >> > issuecomment-346174146
> >> > > >,
> >> > > or mute the thread
> >> > > <https://github.com/notifications/unsubscribe-auth/
> >> > > ABPrxHmTer5XqqCGCtqdcec8z54RI9mVks5s40cDgaJpZM4QjXLg>
> >> > > .
> >> > >
> >> > > —
> >> > > You are receiving this because you commented.
> >>
> >> > >
> >> > > Reply to this email directly, view it on GitHub
> >> > > <#80#
> >>
> >> > issuecomment-346174837
> >> > > >,
> >> > > or mute the thread
> >> > > <https://github.com/notifications/unsubscribe-auth/
> >> > > AAJewGbOzzHLYPsPmyK4qhKFtqMEe7RCks5s40esgaJpZM4QjXLg>
> >> > > .
> >> > >
> >> > > —
> >> > > You are receiving this because you authored the thread.
> >>
> >> > > Reply to this email directly, view it on GitHub
> >> > > <#80#
> >> > issuecomment-346176359>,
> >>
> >>
> >> > > or mute the thread
> >> > > <https://github.com/notifications/unsubscribe-auth/
> >> > ABPrxC8u4DqrnqaBixXUauZ14yemz9RIks5s40kMgaJpZM4QjXLg>
> >>
> >> > > .
> >> > >
> >> >
> >> > —
> >> > You are receiving this because you commented.
> >>
> >> > Reply to this email directly, view it on GitHub
> >> > <#80 (comment)
> >> ment-346177106
> >>
> >> >,
> >> > or mute the thread
> >> > <https://github.com/notifications/unsubscribe-auth/
> >> AAJewByyEeExKoGoB0yw7ishT5bTIeDHks5s40nHgaJpZM4QjXLg>
> >>
> >> > .
> >> >
> >>
> >> —
> >> You are receiving this because you authored the thread.
> >>
> >> Reply to this email directly, view it on GitHub
> >> <#80 (comment)
> >> ment-346185735>,
> >> or mute the thread
> >> <https://github.com/notifications/unsubscribe-auth/
> >> ABPrxA7JDiFz0Oqz9mAAttICg00AlVR5ks5s41ImgaJpZM4QjXLg>
> >> .
> >>
> >> —
> >> You are receiving this because you commented.
> >>
> >> Reply to this email directly, view it on GitHub
> >> <#80 (comment)
> >> ment-346193479>,
> >> or mute the thread
> >> <https://github.com/notifications/unsubscribe-auth/AAJewLgRP
> >> qROmoZpP3VVa59hz6qymp22ks5s41rogaJpZM4QjXLg>
> >> .
> >>
> >> —
> >> You are receiving this because you authored the thread.
> >> Reply to this email directly, view it on GitHub
> >> <#80#
> issuecomment-346200547>,
> >> or mute the thread
> >> <https://github.com/notifications/unsubscribe-auth/ABPrxGu9pLOxGsiYA-
> N6XfNymWoynmbqks5s42RzgaJpZM4QjXLg>
> >> .
> >>
> >
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346202547>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AAJewBtdU0MZrn1iDqnI9XJrvF199yCeks5s42dAgaJpZM4QjXLg>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPrxE8gtkpRldBACv3oyV8KfCxRQIMsks5s45P2gaJpZM4QjXLg>
.
|
I've pushed the tentative fix for PS4 gamepad:
66f7cc1
On Wed, Nov 22, 2017 at 11:17 AM, Iuri Fiedoruk <notifications@github.com>
wrote:
… A bit information on the gamepad that also misses some buttons events:
It a generic gamepad, PS Bluetooth clone by a Polish company (made in China
of course).
The company name is MANTA.
Gamepad model: MM824
The gamepad is designed to operate with Android and iOS but also Windows.
It has three emulation/working modes: normal gamepad mode, keyboard
emulation and mouse emulation - right analog controls the mouse pointer.
The gamepad has an internal power supply of DC 3.7V, 180mA.
Em 22 de nov de 2017 1:24 AM, "Sergii Pylypenko" ***@***.***
>
escreveu:
> This SDL port is mostly used to port opensource Linux games to Android,
> most of them support keyboard really well, but joystick input requires
some
> additional code.
> Mapping gamepad buttons to keypresses just makes it easier to port.
> I did plan to provide API through SDL_JoyButtonEvent, but did not
implement
> it yet.
>
> On Nov 22, 2017 2:13 AM, "Iuri Fiedoruk" ***@***.***>
wrote:
>
> > Oh, and the touchpad on dualshock controller works as a button, it can
be
> > pressed, much like ones in notebooks.
> >
> > Also, when plugging the dualshock4, sound stops, as if android tries to
> use
> > its little speaker as output. But this does not worry me, just FYI.
> >
> > Em 21 de nov de 2017 10:11 PM, "Iuri Fiedoruk" ***@***.***
>
> > escreveu:
> >
> > > The guy that found the issue is using one of those "clip" controls
that
> > > attach to the device and plugs in USB port and he have the same issue
> of
> > > some buttons not being mapped. When using a os2 controller with usb
> > adapter
> > > I also got the problem. It is not only the number of buttons, but the
> > order
> > > that matters, some unimportant ones can work before the ones you want
> to
> > > use.
> > >
> > > That said, why is that you translate gamepads as keyboard inputs to
> > > android sdl instead of just passing it as joysticks to sdl? I think
> that
> > > way you would not have to worry about the buttons.
> > > Or it is possible to do that and I am just missing something in
config?
> > >
> > > Em 21 de nov de 2017 10:01 PM, "Sergii Pylypenko" <
> > > ***@***.***> escreveu:
> > >
> > >> L3 and R3 buttons are analog stick buttons, they are already in the
> API
> > as
> > >> LThumb and RThumb.
> > >>
> > >> I've been using XBox gamepad as a reference so far, and most Android
> > games
> > >> expect 12-button gamepad, if you count two analog stick buttons,
> Start,
> > >> and
> > >> Select (the big X button is used to power it on, it does not send a
> > >> keycode): https://en.wikipedia.org/wiki/Xbox_360_controller
> > >>
> > >> And PS3 controller is the same:
> > >> https://en.m.wikipedia.org/wiki/DualShock#DualShock_3
> > >>
> > >> PS4 adds touchpad, but it would make more sense to use it as a mouse
> > >> input.
> > >> I don't have that gamepad so I cannot test it, but a long time ago
SDL
> > >> supported Xperia Play touchpad.
> > >>
> > >> On Nov 22, 2017 1:21 AM, "Iuri Fiedoruk" ***@***.***>
> > >> wrote:
> > >>
> > >> There are more.
> > >> X, circle, triangle, square, l1, r1, l2, r2, l3, r3, ps and the
> touchbar
> > >> press.
> > >>
> > >>
> > >> Em 21 de nov de 2017 8:43 PM, "Sergii Pylypenko" <
> > >> ***@***.***>
> > >>
> > >> escreveu:
> > >>
> > >> If there are still only 4 face buttons and 4 shoulder buttons,
there's
> > no
> > >> point in adding separate keycodes for C and Z keys, they should
simply
> > >> send
> > >> the same keycodes as L1 an Y keys. I'll add that to SDL.
> > >>
> > >> BTW I've updated that API, now you can assign keycodes to both
analog
> > >> joysticks to act as another DPAD, if you do not open them with
> > >> SDL_JoystickOpen().
> > >>
> > >>
> > >> On Nov 22, 2017 12:08 AM, "Iuri Fiedoruk" ***@***.***
>
> > >> wrote:
> > >>
> > >> > I've tried to add more parameters to the map that sets the keys
for
> C
> > >> and
> > >> > Z, but then I had to do the same for the other calls, one one of
> those
> > >> used
> > >> > some values set by #define, I needed more (it goest until number
> 15, I
> > >> was
> > >> > trying to create 16 and 17 to map it). I created the defines, but
> got
> > >> lost
> > >> > when I needed to also set its values with another #defines....
> > >> >
> > >> > On dualshock4, circle is 98 and R1 is 101.
> > >> >
> > >> > --
> > >> > Iuri Fiedoruk, Software Developer
> > >> >
> > >> > On Tue, Nov 21, 2017 at 8:05 PM, Sergii Pylypenko <
> > >> > ***@***.***>
> > >> > wrote:
> > >> >
> > >> > > Are you trying to increase the key amount in SDL API? I would
> simply
> > >> > treat
> > >> > > the circle key as another 'start' or 'select' key.
> > >> > > I'll do that myself then. Does L1 button send keycode 98, and
> circle
> > >> > button
> > >> > > - keycode 101?
> > >> > >
> > >> > >
> > >> > >
> > >> > > On Nov 21, 2017 11:59 PM, "Iuri Fiedoruk" <
> ***@***.***
> > >
> > >> > > wrote:
> > >> > >
> > >> > > I've started doing that, but the changes needed are way more
> > greater.
> > >> > I've
> > >> > > stopped when I got into having to change macros and defines :(
> > >> > >
> > >> > > Em 21 de nov de 2017 7:56 PM, "Sergii Pylypenko" <
> > >> > ***@***.***
> > >> > > >
> > >> > > escreveu:
> > >> > >
> > >> > >
> > >> > > That explains. Please add these keycodes to
> > >> > > SDL_ANDROID_SetIndividualGamepadKeymap in addition to existing
> ones
> > >> > > and submit a pull request.
> > >> > >
> > >> > > On Nov 21, 2017 11:13 PM, "Iuri Fiedoruk" <
> ***@***.***
> > >
> > >> > > wrote:
> > >> > >
> > >> > > OH, I found it:
> > >> > > C and Z do not exist, they also do not exist on any gamepad I've
> > seen
> > >> > > (PS3/XBox/SHIELD)
> > >> > >
> > >> > > KEYCODE_BUTTON_Z = 101,
> > >> > > KEYCODE_BUTTON_C = 98,
> > >> > >
> > >> > > :)
> > >> > >
> > >> > > —
> > >> > > You are receiving this because you are subscribed to this
thread.
> > >> > > Reply to this email directly, view it on GitHub
> > >> > > <#80#
> > >>
> > >> > issuecomment-346162723
> > >> > > >,
> > >> > > or mute the thread
> > >> > > <https://github.com/notifications/unsubscribe-auth/
> > >> > > AAJewIqv4Yxm3nNdutybpdgFttbarYu3ks5s4zzsgaJpZM4QjXLg>
> > >> > > .
> > >> > >
> > >> > > SDL_ANDROID_SetIndividualGamepadKeymap
> > >> > >
> > >> > > —
> > >> > > You are receiving this because you authored the thread.
> > >>
> > >> > >
> > >> > > Reply to this email directly, view it on GitHub
> > >> > > <#80#
> > >>
> > >> > issuecomment-346174146
> > >> > > >,
> > >> > > or mute the thread
> > >> > > <https://github.com/notifications/unsubscribe-auth/
> > >> > > ABPrxHmTer5XqqCGCtqdcec8z54RI9mVks5s40cDgaJpZM4QjXLg>
> > >> > > .
> > >> > >
> > >> > > —
> > >> > > You are receiving this because you commented.
> > >>
> > >> > >
> > >> > > Reply to this email directly, view it on GitHub
> > >> > > <#80#
> > >>
> > >> > issuecomment-346174837
> > >> > > >,
> > >> > > or mute the thread
> > >> > > <https://github.com/notifications/unsubscribe-auth/
> > >> > > AAJewGbOzzHLYPsPmyK4qhKFtqMEe7RCks5s40esgaJpZM4QjXLg>
> > >> > > .
> > >> > >
> > >> > > —
> > >> > > You are receiving this because you authored the thread.
> > >>
> > >> > > Reply to this email directly, view it on GitHub
> > >> > > <#80#
> > >> > issuecomment-346176359>,
> > >>
> > >>
> > >> > > or mute the thread
> > >> > > <https://github.com/notifications/unsubscribe-auth/
> > >> > ABPrxC8u4DqrnqaBixXUauZ14yemz9RIks5s40kMgaJpZM4QjXLg>
> > >>
> > >> > > .
> > >> > >
> > >> >
> > >> > —
> > >> > You are receiving this because you commented.
> > >>
> > >> > Reply to this email directly, view it on GitHub
> > >> > <#80 (comment)
> > >> ment-346177106
> > >>
> > >> >,
> > >> > or mute the thread
> > >> > <https://github.com/notifications/unsubscribe-auth/
> > >> AAJewByyEeExKoGoB0yw7ishT5bTIeDHks5s40nHgaJpZM4QjXLg>
> > >>
> > >> > .
> > >> >
> > >>
> > >> —
> > >> You are receiving this because you authored the thread.
> > >>
> > >> Reply to this email directly, view it on GitHub
> > >> <#80 (comment)
> > >> ment-346185735>,
> > >> or mute the thread
> > >> <https://github.com/notifications/unsubscribe-auth/
> > >> ABPrxA7JDiFz0Oqz9mAAttICg00AlVR5ks5s41ImgaJpZM4QjXLg>
> > >> .
> > >>
> > >> —
> > >> You are receiving this because you commented.
> > >>
> > >> Reply to this email directly, view it on GitHub
> > >> <#80 (comment)
> > >> ment-346193479>,
> > >> or mute the thread
> > >> <https://github.com/notifications/unsubscribe-auth/AAJewLgRP
> > >> qROmoZpP3VVa59hz6qymp22ks5s41rogaJpZM4QjXLg>
> > >> .
> > >>
> > >> —
> > >> You are receiving this because you authored the thread.
> > >> Reply to this email directly, view it on GitHub
> > >> <#80#
> > issuecomment-346200547>,
> > >> or mute the thread
> > >> <https://github.com/notifications/unsubscribe-
auth/ABPrxGu9pLOxGsiYA-
> > N6XfNymWoynmbqks5s42RzgaJpZM4QjXLg>
> > >> .
> > >>
> > >
> >
> > —
> > You are receiving this because you commented.
> > Reply to this email directly, view it on GitHub
> > <#80#
> issuecomment-346202547>,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/
> AAJewBtdU0MZrn1iDqnI9XJrvF199yCeks5s42dAgaJpZM4QjXLg>
> > .
> >
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#80#
issuecomment-346232323>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
ABPrxE8gtkpRldBACv3oyV8KfCxRQIMsks5s45P2gaJpZM4QjXLg>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJewHArkBjMaLAaz2w1RJO1IODdpMhVks5s4-bGgaJpZM4QjXLg>
.
|
I will give a try later today. BTW, I made a few methods to add achievements into the game. Once I have the time to separate it into its own class, I'll make a push. I hadn't submited before because it had a freeze problem, but it seems I solved by using runOnUiThread on the calls in the Java code. |
The fix "works" in the sense that buttons work, but it actually makes two buttons as one. So, in dualshock4, Circle ans X are not the same thing (A in the case of my configuration). |
Got the buttons working, but something strange happened. I don't know if was my change or yours, because I made my changes after executing a git pull, but now the digital d-pad won't work anymore and the dualshock4 LED is turned off after I plug it in. I can get the analog working, but it is not really the best for playing this kind of game. Tomorrow I try to figure out what made the d-pad stop working by looking at your commits and my changes. My config is: Diff of my changes (sorry about not being cleaned, it is late of the night here in Brazil right now): |
I got the d-pad working by adding back the dpadx checkm that you removed when adding thumbs, into the code. I will see what I can do about that... |
Yes, I've removed dpad processing code by accident. I've added it back, and
also fixed the problem when dpad and analog sticks are using the same
keycode.
…On Fri, Nov 24, 2017 at 12:54 AM, Iuri Fiedoruk ***@***.***> wrote:
I got the d-pad working by adding back the dpadx checkm that you removed
when adding thumbs, into the code.
But one thing I noticed is that both touch buttons as gamepad sends
key.which as zero. Ideally, it would be better to use distinct values, so
the programmer can know from where the input is coming. The reason is that
my game have an option to map custom buttons, but this makes the on-screen
joystick not work anymore if I map the buttons to something else. The
easiest fix for that would be to use default keys when the input comes from
on-screen keyboard, and custom ones when it comes from anything else. But,
as it seems a good bunch of work to add this into your code, as I would
have to add an extra parameter to all SDL_ANDROID_MainThreadPushKeyboardKey()
calls, the other option would be to just change, from my game, the
key-mapping for the touch-joystick also.
I will see what I can do about that...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJewP9dEZz3IHY2BDIxIs3V0XYSYbHCks5s5fe8gaJpZM4QjXLg>
.
|
I made the whole fix, including sending key.witch as 0 for touch and 1 for gamepad/other inputs, so the developer can deal with those differently if he wants. In my case, I use default keys for input 0 and use custom ones for input 1. As soon as I can, I will clean-up the code and make a pull-request; I am very busy this week with some real-life stuff :) |
In SDL configuration menu, I can map all the buttons fine, they are all detected.
But when I start my game, some buttons won't emit event and I can't use them.
Relevant configuration:
When I plug my PS4 Controller, buttons CIRCLE and R1 won't give any events. The code that reads input is like:
while (true) { // keep reading until a key is found while (SDL_PollEvent(&event)) { __android_log_print(ANDROID_LOG_INFO, "###ROCKBOT###", "### INPUT::pick_key_or_button - event.type[%d] ###", (int)event.type);
This not never executes for those keys. I've also tested with a PS2 controller and got same problem, and a user reported that by using one of those "clip" controllers on his tablet, he also can't use a few buttons.
The text was updated successfully, but these errors were encountered: