From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dmta1009.nifty.com (mta-snd01013.nifty.com [106.153.227.45]) by sourceware.org (Postfix) with ESMTPS id 12A6D3858D28 for ; Tue, 3 Oct 2023 12:27:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 12A6D3858D28 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=nifty.ne.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp Received: from HP-Z230 by dmta1009.nifty.com with ESMTP id <20231003122658270.JZTM.65055.HP-Z230@nifty.com>; Tue, 3 Oct 2023 21:26:58 +0900 Date: Tue, 3 Oct 2023 21:26:57 +0900 From: Takashi Yano To: cygwin@cygwin.com Cc: risingpower@gmx.de Subject: Re: SDL2: Gamepads stopped working Message-Id: <20231003212657.572fd142ab72a4ea9ffcc5c8@nifty.ne.jp> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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