* Re: SDL2: Gamepads stopped working
@ 2023-10-05 13:07 risingpower
2023-10-05 14:12 ` Takashi Yano
0 siblings, 1 reply; 11+ messages in thread
From: risingpower @ 2023-10-05 13:07 UTC (permalink / raw)
To: cygwin
On 03.10.2023 14:26, Takashi Yano wrote:
> This is because SDL_mmjoystick.c is removed from the source tree
> of upstream since 2.0.18.
>
> Now I am trying to enable SDL_dinputjoystick.c or SDL_xinputjoystick.c
> instead. Hopefully it will work again in 2.28.4.
>
I compiled SDL 2.28.4 and XInput gamepads work again. (XBOX360 controller)
HID gamepads do NOT work. I guess they did not work when I did the tests
2 years ago.
If I use the SDL2 dll from mingw, also my HID controllers work.
Not sure what's the magic here.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: SDL2: Gamepads stopped working
2023-10-05 13:07 SDL2: Gamepads stopped working risingpower
@ 2023-10-05 14:12 ` Takashi Yano
0 siblings, 0 replies; 11+ messages in thread
From: Takashi Yano @ 2023-10-05 14:12 UTC (permalink / raw)
To: cygwin; +Cc: risingpower
On Thu, 5 Oct 2023 15:07:54 +0200
risingpower wrote:
> On 03.10.2023 14:26, Takashi Yano wrote:
> > This is because SDL_mmjoystick.c is removed from the source tree
> > of upstream since 2.0.18.
> >
> > Now I am trying to enable SDL_dinputjoystick.c or SDL_xinputjoystick.c
> > instead. Hopefully it will work again in 2.28.4.
> >
>
> I compiled SDL 2.28.4 and XInput gamepads work again. (XBOX360 controller)
> HID gamepads do NOT work. I guess they did not work when I did the tests
> 2 years ago.
I guess DirectInput is necessary for that gamepads. I will release
SDL2 2.28.4-1 (TEST) package shortly, where both dinput and xinput
are enabled. Could you please test?
--
Takashi Yano <takashi.yano@nifty.ne.jp>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: SDL2: Gamepads stopped working
2023-10-06 12:00 ` risingpower
@ 2023-10-08 15:07 ` Takashi Yano
0 siblings, 0 replies; 11+ messages in thread
From: Takashi Yano @ 2023-10-08 15:07 UTC (permalink / raw)
To: cygwin; +Cc: risingpower
On Fri, 6 Oct 2023 14:00:16 +0200
risingpower wrote:
> On 06.10.2023 13:14, Takashi Yano wrote:
> >
> > Thanks for the information. I might find the cause.
> > Please test 2.28.4-1a (Test).
>
> It works! HID and XBOX360 controller!
Thank you for testing!
> Thank you very much! What exactly have you done?
1) Fix mishandling for WCHAR string. (Fixes device name)
2) Fix the upstream bug when SDL_VIDEO_DRIVER_WINDOWS is not defined.
(Fixes dinput open failure)
3) Drop SDL_JOYSTICK_RAWINPUT. (Make xinput device work)
> The XBOX controller identifies now as "XInput Controller #1",
> but that's ok.
This is the result of 3).
I will release SDL2 2.28.4-2 shortly.
--
Takashi Yano <takashi.yano@nifty.ne.jp>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: SDL2: Gamepads stopped working
2023-10-06 11:14 ` Takashi Yano
@ 2023-10-06 12:00 ` risingpower
2023-10-08 15:07 ` Takashi Yano
0 siblings, 1 reply; 11+ messages in thread
From: risingpower @ 2023-10-06 12:00 UTC (permalink / raw)
To: cygwin
On 06.10.2023 13:14, Takashi Yano wrote:
>
> Thanks for the information. I might find the cause.
> Please test 2.28.4-1a (Test).
>
It works! HID and XBOX360 controller!
Thank you very much! What exactly have you done?
The XBOX controller identifies now as "XInput Controller #1",
but that's ok.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: SDL2: Gamepads stopped working
2023-10-06 7:26 risingpower
@ 2023-10-06 11:14 ` Takashi Yano
2023-10-06 12:00 ` risingpower
0 siblings, 1 reply; 11+ messages in thread
From: Takashi Yano @ 2023-10-06 11:14 UTC (permalink / raw)
To: cygwin; +Cc: risingpower
On Fri, 6 Oct 2023 09:26:39 +0200
risingpower wrote:
> On 05.10.2023 18:38, Takashi Yano wrote:
> >
> > Thanks for testing!
> > What error occurs for XBOX360 controller?
> >
>
> There is no error message. Everything looks fine, but the controller
> doesn't work.
Thanks for the information. I might find the cause.
Please test 2.28.4-1a (Test).
--
Takashi Yano <takashi.yano@nifty.ne.jp>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: SDL2: Gamepads stopped working
@ 2023-10-06 7:26 risingpower
2023-10-06 11:14 ` Takashi Yano
0 siblings, 1 reply; 11+ messages in thread
From: risingpower @ 2023-10-06 7:26 UTC (permalink / raw)
To: cygwin
On 05.10.2023 18:38, Takashi Yano wrote:
>
> Thanks for testing!
> What error occurs for XBOX360 controller?
>
There is no error message. Everything looks fine, but the controller
doesn't work.
Best regards,
Richard
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: SDL2: Gamepads stopped working
2023-10-05 15:15 risingpower
@ 2023-10-05 16:38 ` Takashi Yano
0 siblings, 0 replies; 11+ messages in thread
From: Takashi Yano @ 2023-10-05 16:38 UTC (permalink / raw)
To: cygwin; +Cc: risingpower
On Thu, 5 Oct 2023 17:15:42 +0200
risingpowe wrote:
> On 05.10.2023 16:12, Takashi Yano wrote:>
> > I guess DirectInput is necessary for that gamepads. I will release
> > SDL2 2.28.4-1 (TEST) package shortly, where both dinput and xinput
> > are enabled. Could you please test?
> >
>
> Thank you very much!
>
> My gamepads show up, but do not work.
> - SDL_NumJoysticks() is now correct: 2
> - The USB HID controller generates this SDL_GetError() for
> SDL_GameControllerOpen():
> IDirectInputDevice8::SetCooperativeLevel() DirectX error 0x80070006
> - And SDL_JoystickNameForIndex() only returns one character "U" instead
> of "USB Gamepad"
> - XBOX360 controller identifies itself correctly as
> "Xbox 360 Controller", but does not work.
Thanks for testing!
What error occurs for XBOX360 controller?
--
Takashi Yano <takashi.yano@nifty.ne.jp>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: SDL2: Gamepads stopped working
@ 2023-10-05 15:15 risingpower
2023-10-05 16:38 ` Takashi Yano
0 siblings, 1 reply; 11+ messages in thread
From: risingpower @ 2023-10-05 15:15 UTC (permalink / raw)
To: cygwin
On 05.10.2023 16:12, Takashi Yano wrote:>
> I guess DirectInput is necessary for that gamepads. I will release
> SDL2 2.28.4-1 (TEST) package shortly, where both dinput and xinput
> are enabled. Could you please test?
>
Thank you very much!
My gamepads show up, but do not work.
- SDL_NumJoysticks() is now correct: 2
- The USB HID controller generates this SDL_GetError() for
SDL_GameControllerOpen():
IDirectInputDevice8::SetCooperativeLevel() DirectX error 0x80070006
- And SDL_JoystickNameForIndex() only returns one character "U" instead
of "USB Gamepad"
- XBOX360 controller identifies itself correctly as
"Xbox 360 Controller", but does not work.
What options have you added to ./configure?
IMHO just leave blank. This way at least one category of controllers
should work.
Best regards,
Richard
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: SDL2: Gamepads stopped working
@ 2023-10-03 12:32 risingpower
0 siblings, 0 replies; 11+ messages in thread
From: risingpower @ 2023-10-03 12:32 UTC (permalink / raw)
To: cygwin
On 03.10.2023 14:26, Takashi Yano wrote:>
> This is because SDL_mmjoystick.c is removed from the source tree
> of upstream since 2.0.18.
>
> Now I am trying to enable SDL_dinputjoystick.c or SDL_xinputjoystick.c
> instead. Hopefully it will work again in 2.28.4.
>
Oh, good to know! Thank you!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: SDL2: Gamepads stopped working
2023-10-03 9:20 risingpower
@ 2023-10-03 12:26 ` Takashi Yano
0 siblings, 0 replies; 11+ messages in thread
From: Takashi Yano @ 2023-10-03 12:26 UTC (permalink / raw)
To: cygwin; +Cc: risingpower
On Tue, 3 Oct 2023 11:20:30 +0200
risingpower wrote:
> Hi,
>
> after a cygwin update, SDL2 does not recognize my gamepads any more.
> They definitely worked before:
> libSDL2_2.0_0-2.0.7-1.tar.xz <- joystick worked fine (2021-10-09)
> libSDL2_2.0_0-2.28.3-2.tar.xz <- SDL_NumJoysticks() is 0 (2023-09-30)
>
> Example:
> // $ gcc -o testjoystick testjoystick.cc $(pkg-config --cflags --libs SDL2)
> #include <SDL.h>
> #include <stdio.h>
>
> int main(int argc, char *argv[]) {
> if (!SDL_WasInit(SDL_INIT_JOYSTICK)) {
> int res = SDL_Init(SDL_INIT_JOYSTICK);
> if (res < 0)
> printf("SDL init joystick failed: %s\n", SDL_GetError());
> }
> int num_joysticks = SDL_NumJoysticks();
> printf("SDL_NumJoysticks()=%d\n", num_joysticks);
>
> return 0;
> }
This is because SDL_mmjoystick.c is removed from the source tree
of upstream since 2.0.18.
Now I am trying to enable SDL_dinputjoystick.c or SDL_xinputjoystick.c
instead. Hopefully it will work again in 2.28.4.
--
Takashi Yano <takashi.yano@nifty.ne.jp>
^ permalink raw reply [flat|nested] 11+ messages in thread
* SDL2: Gamepads stopped working
@ 2023-10-03 9:20 risingpower
2023-10-03 12:26 ` Takashi Yano
0 siblings, 1 reply; 11+ messages in thread
From: risingpower @ 2023-10-03 9:20 UTC (permalink / raw)
To: cygwin
Hi,
after a cygwin update, SDL2 does not recognize my gamepads any more.
They definitely worked before:
libSDL2_2.0_0-2.0.7-1.tar.xz <- joystick worked fine (2021-10-09)
libSDL2_2.0_0-2.28.3-2.tar.xz <- SDL_NumJoysticks() is 0 (2023-09-30)
Example:
// $ gcc -o testjoystick testjoystick.cc $(pkg-config --cflags --libs SDL2)
#include <SDL.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
if (!SDL_WasInit(SDL_INIT_JOYSTICK)) {
int res = SDL_Init(SDL_INIT_JOYSTICK);
if (res < 0)
printf("SDL init joystick failed: %s\n", SDL_GetError());
}
int num_joysticks = SDL_NumJoysticks();
printf("SDL_NumJoysticks()=%d\n", num_joysticks);
return 0;
}
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-10-08 15:07 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-05 13:07 SDL2: Gamepads stopped working risingpower
2023-10-05 14:12 ` Takashi Yano
-- strict thread matches above, loose matches on Subject: below --
2023-10-06 7:26 risingpower
2023-10-06 11:14 ` Takashi Yano
2023-10-06 12:00 ` risingpower
2023-10-08 15:07 ` Takashi Yano
2023-10-05 15:15 risingpower
2023-10-05 16:38 ` Takashi Yano
2023-10-03 12:32 risingpower
2023-10-03 9:20 risingpower
2023-10-03 12:26 ` Takashi Yano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).