Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind /dev/input to have a controller in Wine #53

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions sandwine/_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ def parse_command_line(args):
action='store_true',
help='enable sound using PulseAudio (default: sound disabled)')

input_args = parser.add_argument_group('input arguments')
input_args.add_argument('--raw-input',
dest='raw_input',
action='store_true',
help='enable access to /dev/input , to have controller in wine (CAREFUL!) (default: raw-input disabled)')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about?:

--- help='enable access to /dev/input , to have controller in wine (CAREFUL!) (default: raw-input disabled)')
+++ help='enable access to /dev/input for a working game controller in Wine (CAREFUL!) (default: /dev/input not forwarded)')


mount = parser.add_argument_group('mount arguments')
mount.add_argument('--dotwine',
metavar='PATH:{ro,rw}',
Expand Down Expand Up @@ -275,6 +281,12 @@ def create_bwrap_argv(config):
env_tasks['PULSE_SERVER'] = f'unix:{pulseaudio_socket}'
mount_tasks += [MountTask(MountMode.BIND_RW, pulseaudio_socket)]

# input
if config.raw_input:
# default udev based hotplug not working in conatiner
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo "conatiner"

env_tasks['SDL_JOYSTICK_DISABLE_UDEV'] = "1"
mount_tasks += [MountTask(MountMode.BIND_DEV, '/dev/input')]

# X11
if X11Mode(config.x11) != X11Mode.NONE:
x11_unix_socket = X11Display(config.x11_display_number).get_unix_socket()
Expand Down