diff options
author | WebFreak001 <gh@webfreak.org> | 2020-06-12 21:01:30 +0000 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-06-13 05:21:25 +0000 |
commit | af94cbca3243c21fe03d7895da439532ce4bc24e (patch) | |
tree | 943ddb92bb7b8964776d98cf1e4744a13ba5fa17 /README.md | |
parent | 6bde0531a61212a075490d2701d44ede7b35211b (diff) | |
download | vr-video-player-af94cbca3243c21fe03d7895da439532ce4bc24e.tar.gz vr-video-player-af94cbca3243c21fe03d7895da439532ce4bc24e.tar.bz2 vr-video-player-af94cbca3243c21fe03d7895da439532ce4bc24e.zip |
add ability to reset rotation via signal + gamepad
The gamepad change isn't the best as it requires the window to be
focused, but it allows to use a wireless gamepad to reset the rotation
and position like using the w key on the keyboard. I currently hardcoded
the reset button to 6 on a joystick, which was equal to the select
button on my steam controller using sc-controller simulating an xbox
controller. Maybe the controller update isn't quite fit to stay and
should use the VR controllers instead & work without focus.
The more interesting part of this patch is adding signal handling of
SIGUSR1 or SIGUSR2 to do the same thing. This allows to simply run a
command like `killall -USR1 vr-video-player` to reset the rotation and
position even without window focus. This is especially useful for
example for adding a custom command action to KDE connect so you can
reset the VR view from your phone without needing to have any special
software.
However I believe even this signal handling should eventually be
replaced with some more advanced API like dbus or a unix socket to also
allow for more advanced features like changing tracked windows on the
fly.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -14,7 +14,11 @@ If the video is not meant to be viewed as a sphere but as a rectangle, then pass If the video is flipped where the right eye is on the left side, then pass the `--right-left` option when running vr video player.\ If the video is stretched, then pass the `--no-stretch`option when running vr video player. Note: This option only works when also using the `--flat` option. -To rotate the video to be in front of you, pull the trigger on the vr controller or press `w` on your keyboard while the vr video player is focused. +To rotate and move the video to be in front of you, pull the trigger on the vr controller or press `w` on your keyboard while the vr video player is focused. You can also use the select/back button on an xbox controller while the application is focused or send the SIGUSR1 signal to the application to do the same thing like using the following command: + +``` +killall -USR1 vr-video-player +``` # Games This vr video player can also be used to play games in VR to to get a 3D effect, and even for games that don't support VR.\ |