Re: SDL2: Gamepads stopped working
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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Re: SDL2: Gamepads stopped working
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. -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Re: SDL2: Gamepads stopped working
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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Re: SDL2: Gamepads stopped working
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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Re: SDL2: Gamepads stopped working
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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Re: SDL2: Gamepads stopped working
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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Re: SDL2: Gamepads stopped working
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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Re: SDL2: Gamepads stopped working
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. -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Re: SDL2: Gamepads stopped working
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! -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Re: SDL2: Gamepads stopped working
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 > #include > > 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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple