While admittedly there is no case of us using any invalid LsiRedirectOperation,
there exists the future possibility for invalid inserts into the op table
when we encounter an unhandled op type.
Knock it on the head and bail early, as appropriate.
Signed-off-by: Ikey Doherty <ikey.doherty@intel.com>
Weird janky escaping is left-over from our time as an
autotools project and should've been fixed long ago as
it was obvious the compiler warnings were legit.
Signed-off-by: Ikey Doherty <ikey.doherty@intel.com>
Additionally, add an output report to show at build time what we're
configured to do, ala autotools.
Signed-off-by: Ikey Doherty <ikey.doherty@intel.com>
Instead of the potential ugly route of whitelisting (which still might be
needed in future) we'll allow the SDL2 core library to be overriden only
on 32-bit builds of Steam games.
This has the interesting side-effect of enabling Don't Starve to work
correctly, as it ships a custom patched (incompatible ABI) version of
SDL2 to change the mouse event handling.
If it turns out random 32-bit games break by using their own old and
unmodified builds of SDL2, we'll implement whitelisting. For now, this
change should suffice.
Signed-off-by: Ikey Doherty <ikey.doherty@intel.com>
Previous copyright assignment was to myself but the range doesn't account
for the project WIPs and lifetime, so retroactively fit them to the right
year range (project duration). Now set ongoing copyright for future and
current changes.
Signed-off-by: Ikey Doherty <ikey.doherty@intel.com>
On some distributions, `linux32` command is not readily available in the
default install. However, `setarch` is commonly available as part of the
`util-linux` packaging, so let's invoke `setarch` directly now without
relying on links.
Signed-off-by: Ikey Doherty <ikey.doherty@intel.com>
This is required for some Aspyr ports which will form their own fixed
paths to directories based on getpwuid() as opposed to using the environment
`HOME` variable.
With this we force the home directory to be consistent under snapd and
alleviate any issues with denials based on home directory lookups.
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This will alleviate some weird apparmor confinement denials when trying
to access the wrong directory.
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This is as yet untested, but the basic idea is that when games call out
to `system("pulseaudio --check > /dev/null 2>&1")` we'll put our script
in their way and unconditionally return 0. This is for games using libfmod,
which will die when trying to execute pulseaudio right now.
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This reverts commit c640f2f215.
Turns out this is due to a very weird situation where Arch has their
libudev.so.0 as an incompatible API which all current games expect to
be of libudev.so.1 ABI, and isn't something LSI should be fixing, the
distro should.
Arch Linux uses a funky udev shim package which is incompatible with
our udev workaround, so allow them to disable it and use their shim
instead (as some packages are apparently **built** against the shim.)
For all other distros which are binary-built in ABI lockstep with udev
proper, keep it enabled.
This fixes#46.
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This should fix our linking issues that appeared once we opted to include
the `fcntl.h` header, which adds `#define`s for the exact symbols that
we are trying to override.
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This ensures we only use a sane realpath and collapse the slashes where
we can to allow trivial string matching.
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
If we detect access to a unity3D configuration file, we'll enter the
unity3d workaround mode. Through this mode we'll abstract the real
"prefs" file away into `/dev/shm` so that Unity games do not directly
access that file again.
If no original prefs file exists, we'll write a new prefs file with the
absolute minimum requirement, i.e. disabling of fullscreen mode by default.
If one DOES exist, we'll copy all of the prefs file **except** for the
fullscreen option, and again, disabling it.
Upon library exit, again, we'll duplicate the unity config to the real
target file from the shm file, with the rewritten fullscreen option.
The net effect is that we create a circle of consumption that forcibly
disables unity games of a particular age (using `prefs` file) to not
start in fullscreen mode, which almost always means one of two things:
- Missing UI text elements
- Unity3D clamps resolution to 0x0
Many ports aren't going to see updates to their Unity build for a long time,
or indeed, ever. Instead we work around this in LSI and sit in between the
game and the configuration file.
Signed-off-by: Ikey Doherty <ikey@solus-project.com>