Skip to content
This repository has been archived by the owner on Oct 25, 2018. It is now read-only.

Add joystick access to the sandbox #149

Closed
hadess opened this issue Apr 29, 2016 · 7 comments
Closed

Add joystick access to the sandbox #149

hadess opened this issue Apr 29, 2016 · 7 comments

Comments

@hadess
Copy link
Contributor

hadess commented Apr 29, 2016

As done in this patch:

0001-Add-support-for-accessing-joysticks.txt

@hadess
Copy link
Contributor Author

hadess commented May 4, 2016

I looked at the new bubblewrap-using code. Does:

        add_args (argv_array,
                  "--dev-bind", "/dev/input/js0", "/dev/input/js0",
                  NULL);

work if the device in question appears after the application has started? For joysticks, we really want to be able to use them even if the app is already started.

hadess added a commit to hadess/flatpak-fusion that referenced this issue May 4, 2016
But it's not currently building successfully, so disabled.

The majority of the build goo is based on:
https://github.com/thias/retroarch-fedora
and the Fedora packages.

See also:
alexlarsson/xdg-app#149
alexlarsson/xdg-app#154
@alexlarsson
Copy link
Owner

No. In fact, there is no great way to handle that at all, because to create bind mount such as those you need increased privileges, which we have only on startup.
The nicest approach is if we could grant access to an entier directory with only those devices, because then it could later be changed on the host side.

@hadess
Copy link
Contributor Author

hadess commented May 12, 2016

Good thing is that SDL, I'm guessing the primary "legacy" user for this feature, uses udev to discover devices, so we could put it anywhere we wanted in the /dev tree.

We do compile SDL with udev support in the fd.o framework, right?

@alexlarsson
Copy link
Owner

No, we don't have udev in the runtime, because it needs the database created by udevd, and the udev people (kay) said it is not ABI stable across different versions.

@hadess
Copy link
Contributor Author

hadess commented May 12, 2016

Then that means we can't implement this feature without patching ugly things into SDL :(

@hadess
Copy link
Contributor Author

hadess commented May 12, 2016

Is it feasible to have the whole of /dev/input exported, even if devices other than the joysticks we want to access will be there, but protected through permissions?

This wouldn't fix hotplugging though.

@alexlarsson
Copy link
Owner

This issue was moved to flatpak/flatpak#7

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants