Sent from ProtonMail Mobile

On Mon, May 6, 2019 at 16:55, Wolfgang Pfeiffer <[email protected]> wrote:

> Hi all
>
> Has anyone actually tried to use that controller on a fresh or older
> OpenBSD? If yes: successful?
>
> I found hints in the 6.5 ports tree relating to that controller (and
> the sdl2 package seems to be part of the regular packages tree, too)
>
> ../ports/devel/premake4/files/scripts.c
> ../ports/devel/sdl2/patches/patch-src_joystick_SDL_gamecontroller_c
>
> Strongest hints at:
> .. ports/devel/sdl2/pkg/README:
>
> ==============================================
>
> $OpenBSD: README,v 1.2 2018/09/04 12:46:11 espie Exp $
>
> +-----------------------------------------------------------------------
> | Customizing ${PKGSTEM} gamecontroller layout on OpenBSD
> +-----------------------------------------------------------------------
>
> The mapping for SDL2's gamecontroller API is currently based on a workaround.
> It defaults to:
>
> "none,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,
> dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,
> leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,
> righty:a4,start:b7,x:b2,y:b3,"
>
> A custom mapping can be used via the SDL_GAMECONTROLLERCONFIG env var. Note
> that the first value (for guid) should be 'none' and the second one can be any
> name under which SDL2 will list the gamecontroller device.
>
> Example mapping (for Logitech Dual Action gamepad):
>
> $ export SDL_GAMECONTROLLERCONFIG="none,X360WirelessController,a:b1,b:b2,
> back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,
> leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,
> righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,"
>
> =============================================
>
> Thanks in anticipation,
> Wolfgang

Reply via email to