From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <9front-bounces@9front.inri.net> X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from 9front.inri.net (9front.inri.net [168.235.81.73]) by inbox.vuxu.org (Postfix) with ESMTP id 6D9BD2467B for ; Sat, 9 Nov 2024 14:33:30 +0100 (CET) Received: from cc-smtpout1.netcologne.de ([89.1.8.211]) by 9front; Sat Nov 9 08:32:07 -0500 2024 Received: from cc-app1.netcologne.de (cc-app1.netcologne.de [89.1.9.190]) by cc-smtpout1.netcologne.de (Postfix) with ESMTP id 0223F1254A for <9front@9front.org>; Sat, 9 Nov 2024 14:32:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=netcologne.de; s=nc1116a; t=1731159125; bh=whwq9ZdTcc8GBx3LY9qU4DnX80P1t22MaDp13ytU+bY=; h=Date:From:To:Message-ID:In-Reply-To:References:Subject:From; b=IM0KBRafT3sjtIUdOq7XmNV6Bwd90j81vwSB7oB7ydrN9UH1wpQy8B2uLZtffXGBH gtKmEUK29KtI7bgbO5L0OIlymmdwC7OXlVPHU07PbMlwq9ToR/NY1uuLmGgi2Ak5Nk oS3CnoJQbrnGn4MqMJIgr/dc3OCsDI01+nuFPTeqWnob2xKzeGUeKWwSYUIvg1UwrN flnQ+m89bwsXtvRwjl4tZgoTkBQi34KA/KAz3VIH9IfeXLqAAXtza/m0ospBduYd7P BVP7J0CC5CzBLglmeWCRaRbgDftXOgSj8T+F03xbaSd1Jhc3Gd5euhIcbtbOngRYIO q6z9EL8GMwviQ== Received: from cc-app1.netcologne.de (localhost [127.0.0.1]) by cc-app1.netcologne.de (Postfix) with ESMTPA id BBC1711D83 for <9front@9front.org>; Sat, 9 Nov 2024 14:32:04 +0100 (CET) Date: Sat, 9 Nov 2024 14:32:04 +0100 (CET) From: Arne Meyer To: 9front@9front.org Message-ID: <1056451222.2568637.1731159124673@comcenter.netcologne.de> In-Reply-To: <1471971331.1907621.1729341892650@comcenter.netcologne.de> References: <1471971331.1907621.1729341892650@comcenter.netcologne.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2568636_1498109747.1731159124673" X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.6-Rev59 X-Originating-IP: 2001:4dd1:d9b9:0:949b:3f1f:28e3:1218 X-Originating-Client: open-xchange-appsuite X-NetCologne-Spam: L X-Rspamd-Queue-Id: BBC1711D83 X-Rspamd-Action: no action X-Spamd-Bar: --- List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: overflow-preventing JSON over JSON rich-client-scale CMS-based generator Subject: Re: [9front] [patch] nusb/ joy: xbox360 controller support and improved hid parsing Reply-To: 9front@9front.org Precedence: bulk ------=_Part_2568636_1498109747.1731159124673 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit new version. I fixed some style issues and the dpad buttons of the controller now get mapped to regular buttons. ok? > Arne Meyer hat am 19.10.2024 14:44 CEST geschrieben: > > > Hello, > > this patch adds some improvements to nusb/joy. > > Support for xbox360 controllers. > Up to six axes are now supported for analog input. > The DPad gets mapped to buttons 16-19. > Added a simple deadband filter for analog axes. > > Thanks qwx for feedback and help with the man page changes! > > Greetings, > Arne ------=_Part_2568636_1498109747.1731159124673 Content-Type: application/octet-stream; name=xbox360.diff Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=xbox360.diff X-Part-Id: b5ff189d812444318ef1e5bfb68485d3 ZGlmZiBjNTE1NjZmYWE3NzgxMGE0NTdhNTQzZmZjZjU3MDdkYjk1NzljMjdhIHVuY29tbWl0dGVk Ci0tLSBhL3N5cy9tYW4vNC9udXNiCisrKyBiL3N5cy9tY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