Bug 231370 - [PATCH] devel/sdl12: improve joystick support
Summary: [PATCH] devel/sdl12: improve joystick support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Eugene Grosbein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-15 02:47 UTC by rozhuk.im
Modified: 2018-11-06 17:29 UTC (History)
3 users (show)

See Also:
eugen: maintainer-feedback-


Attachments
patch (55.93 KB, patch)
2018-09-15 02:47 UTC, rozhuk.im
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rozhuk.im 2018-09-15 02:47:09 UTC
Created attachment 197098 [details]
patch

1. Update BSD driver:
 - do not use uhid devices like keyboard as joystick
 - add env SDL_JOYSTICK_DEVICE variable handle
 - some small improvements: set verbose names, code formatting

2. Add option to able to compile with linux driver.


Without this patch dgen report that my keyboard is joystick with "0 axes, 0 button(s), 0 hat(s)" and do not see mine gamepad.
Now via BSD driver dgen see both mine gamepads.
With linux I test only with one gamepad.
All works OK.
Comment 1 rozhuk.im 2018-09-15 17:00:12 UTC
Linux joystick driver need because then webcamd attach to gamepad/joyctisk then uhid disappear and native BSD driver in SDL 1.2 cant attach to it.
Comment 2 commit-hook freebsd_committer 2018-11-06 17:28:18 UTC
A commit references this bug:

Author: eugen
Date: Tue Nov  6 17:28:02 UTC 2018
New revision: 484313
URL: https://svnweb.freebsd.org/changeset/ports/484313

Log:
  devel/sdl12: improve joystick support

  1. Update BSD driver:
  - do not use uhid devices like keyboard as joystick
  - add env SDL_JOYSTICK_DEVICE variable handle
  - some small improvements: set verbose names, code formatting

  2. Add option to compile with linux driver.

  PR:		231370
  Submitted by:	Ivan Rozhuk <rozhuk.im@gmail.com>
  Approved by:	amdmi3 (maintainer timeout, 3 weeks)

Changes:
  head/devel/sdl12/Makefile
  head/devel/sdl12/files/input-event-codes.h
  head/devel/sdl12/files/input.h
  head/devel/sdl12/files/joystick.h
  head/devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c
  head/devel/sdl12/files/types.h
  head/devel/sdl12/pkg-message.linjoy
Comment 3 Eugene Grosbein freebsd_committer 2018-11-06 17:29:48 UTC
Committed, thanks!