Update 2018-11-15 to version 2.0.
The old thread, https://forums.frontier.co.uk/showt...-program-for-VR-headsets-with-joysticks-HOTAS is locked for some reason, so here is a new thread =)
What is this? In its core, its a program to make sure Elite Dangerous (or any other game if you like...) does not lose focus when playing in VR or when using dual monitors for example. I originally wrote it because I hated when something stole focus in the middle of a game and I crashed into a star before I had time to refocus the game window. It does this by monitoring joystick inputs and as soon as it detects one, refocuses the defined window (Elite dangerous in this case).
I then kept building on it, although everything can be enable/disabled to your liking. Simply run it and an INI file will be created and opened in notepad. All the settings are explained in it.
You can define which joystick or joysticks to monitor and what inputs on said joystick to check for movement / button presses. You also have a defined joystick tolerance so that it does not react as a movement just because you bang your fist on your table, moving the joystick.
It also has the ability to change default sound device depending on if the game window is in focus or not, so if you watch youtube or something on your headphones, the audio will go to that if Elite Dangerous is not in focus. As soon as Elite is back in focus, the sound output is set back to the rift/vive/whatever. This function, even when disabled, is why it wants to run as administrator on launch.
You can also define a hotkey to switch it manually or change it to only switch manually (never automatic).
It can launch other programs when it detects that Elite is active. I always forget to start ED Market Connector and VoiceAttack, for example, so I just start ED:Runner now and when I launch Elite, the other programs are started automatically.
It can do a mouseclick in the Elite game window when it starts to shorten the intro. Hated waiting for that or searching blind for the mouse.
It can tell you to "look straight ahead" (definable) during Elite launch and then press a key to reset the headset (F12) by default.
It speaks! Yes. You can define, if you want, it to talk on various events. Elite focus lost? Say so! It will use the normal speech engine in Windows for this. Personally I payed for Cepstral David as I also use EDDI with VoiceAttack, but yeah. Up to you. Works just as fine with Windows default voices.
NOTE: If you can't seem to change the voice on a 64bit operating system, try running the 32bit speech properties: C:\Windows\SysWOW64\Speech\SpeechUX\sapi.cpl
Someone once said you can get rid of microstutter by setting the Elite process to high priority. So it can do that as well. And WatchDog64, Elites Anti-Cheat engine to Low priority. Not sure if this even does anything, but there it is.
You must define which joystick(s) to monitor. I've included a Joystick_Test program you can run. It will show up to 8 connected controllers and which ID they have. Then you know which number(s) to enter in the INI file that is created on first run of ED:Runner, so it knows which joystick(s) to monitor for movement.
NOTE! When running the Joystick_Test program, test by clicking somewhere else so the test program is not in focus. If you find that the test program stops reacting to joystick movement, you're probably using an XBOX controller of some sort. Microsoft have, at the time of writing, messed up the drivers in some patch so the joystick test program must be in focus to react to movement / button presses. This, of course, also affects ED:Runner and any other program you define should react (Push to talk for example).
There is a solution though. Downgrade your drivers for the XBOX controller. I've made a pretty little package that you'll find in the Xbox_Controller_Drivers folder with a ReadMe.txt once you've unpacked ED:Runner.
You will also find a Debug folder. Running that will bring up a command window, showing everything ED:Runner does. Personally I run that all the time because I think its fun to see what it does.
Download x64 version here: http://grandis.nu/downloads/ED_Runner_2.1.zip
For older versions, simply change to version number in the link from 1.0 and up. If you have need for a 32bit version, let me know...
If you feel the urge to donate, there is a "donate" button in the Joystick_Test.exe =) Thanks!
NOTE: While this program can monitor more than one joystick/controller at the same time, if you only want a specific joystick for it to react to, you might notice that the IDs of your controllers are randomized at startup if they are USB. There is no way around this. Well, not natively. I did however write a program so solve this, forcing them into specific IDs, a while back that you might want to check out: ftp://misc:misc@grandis.nu/Tur-Game_Controller_Order
It was originally made for Arcade Cabinets that use USB controllers since emulators are notorious for wanting specific controller IDs when configuring the inputs but it works just as well for this. Most people will have no need for this!
The old thread, https://forums.frontier.co.uk/showt...-program-for-VR-headsets-with-joysticks-HOTAS is locked for some reason, so here is a new thread =)
What is this? In its core, its a program to make sure Elite Dangerous (or any other game if you like...) does not lose focus when playing in VR or when using dual monitors for example. I originally wrote it because I hated when something stole focus in the middle of a game and I crashed into a star before I had time to refocus the game window. It does this by monitoring joystick inputs and as soon as it detects one, refocuses the defined window (Elite dangerous in this case).
I then kept building on it, although everything can be enable/disabled to your liking. Simply run it and an INI file will be created and opened in notepad. All the settings are explained in it.
You can define which joystick or joysticks to monitor and what inputs on said joystick to check for movement / button presses. You also have a defined joystick tolerance so that it does not react as a movement just because you bang your fist on your table, moving the joystick.
It also has the ability to change default sound device depending on if the game window is in focus or not, so if you watch youtube or something on your headphones, the audio will go to that if Elite Dangerous is not in focus. As soon as Elite is back in focus, the sound output is set back to the rift/vive/whatever. This function, even when disabled, is why it wants to run as administrator on launch.
You can also define a hotkey to switch it manually or change it to only switch manually (never automatic).
It can launch other programs when it detects that Elite is active. I always forget to start ED Market Connector and VoiceAttack, for example, so I just start ED:Runner now and when I launch Elite, the other programs are started automatically.
It can do a mouseclick in the Elite game window when it starts to shorten the intro. Hated waiting for that or searching blind for the mouse.
It can tell you to "look straight ahead" (definable) during Elite launch and then press a key to reset the headset (F12) by default.
It speaks! Yes. You can define, if you want, it to talk on various events. Elite focus lost? Say so! It will use the normal speech engine in Windows for this. Personally I payed for Cepstral David as I also use EDDI with VoiceAttack, but yeah. Up to you. Works just as fine with Windows default voices.
NOTE: If you can't seem to change the voice on a 64bit operating system, try running the 32bit speech properties: C:\Windows\SysWOW64\Speech\SpeechUX\sapi.cpl
Someone once said you can get rid of microstutter by setting the Elite process to high priority. So it can do that as well. And WatchDog64, Elites Anti-Cheat engine to Low priority. Not sure if this even does anything, but there it is.
You must define which joystick(s) to monitor. I've included a Joystick_Test program you can run. It will show up to 8 connected controllers and which ID they have. Then you know which number(s) to enter in the INI file that is created on first run of ED:Runner, so it knows which joystick(s) to monitor for movement.
NOTE! When running the Joystick_Test program, test by clicking somewhere else so the test program is not in focus. If you find that the test program stops reacting to joystick movement, you're probably using an XBOX controller of some sort. Microsoft have, at the time of writing, messed up the drivers in some patch so the joystick test program must be in focus to react to movement / button presses. This, of course, also affects ED:Runner and any other program you define should react (Push to talk for example).
There is a solution though. Downgrade your drivers for the XBOX controller. I've made a pretty little package that you'll find in the Xbox_Controller_Drivers folder with a ReadMe.txt once you've unpacked ED:Runner.
You will also find a Debug folder. Running that will bring up a command window, showing everything ED:Runner does. Personally I run that all the time because I think its fun to see what it does.
Download x64 version here: http://grandis.nu/downloads/ED_Runner_2.1.zip
For older versions, simply change to version number in the link from 1.0 and up. If you have need for a 32bit version, let me know...
Code:
2.1:
* Joystick_Test.exe improved codewise. Added version and architechture to the title as well.
* If only one joystick was defined and it was not JoyID:0, it might crash when trying to detect movement if focus was lost. Fixed.
* Added the ability to define parameters to RunPrograms applications. Just add another = after the .exe with the args you want. Example:
VoiceAttack=C:\Program Files (x86)\VoiceAttack\VoiceAttack.exe=-reverseprofilepriority
Or if you want multiple args, just use a space.
VoiceAttack=C:\Program Files (x86)\VoiceAttack\VoiceAttack.exe=-reverseprofilepriority -listeningon
2.0:
* JoystickID can now take a range of Controller IDs to monitor instead of just one. The default is still only one ID, but you can specify a range with, for example, 0-2 to monitor
your first 3 controllers for movement. Observe that the range MUST start with 0.
This will probably make it a little slower to react to movement. If you specify more than the number of controllers you have, nothing bad will happen. It'll just take even longer.
Had to rewrite large portions of the program for this to work so it suits it well to be called 2.0.
* Added MonitorDelay option to the Extras section. This controls how long to wait, in MS, between checking the joystick for movement when the game is not the active window.
The default is 100 MS (Same as old versions) which makes it very quick to react to movements, but it might also take some CPU (Check task manager when game is not active).
If you think ED:Runner takes too much CPU, try raising it a bit (start with 200).
Setting it to 0 will make it mega responsive, but it will then take 8% CPU on an overclocked Intel 8700k ... Plus it might make it hard to break the JoyTolerance when it checks
that often.
* New Joystick_Test program that shows all controllers at once (well, 8 of them).
* Compiled as x64 instead of x86. No more x86 support (As if anyone use that with VR anyway...)
1.9:
* ED:Runner is no longer paused when talking, with the help of a new "ED_Speak.exe" executable. That will do the talking while the main program keeps running instead of waiting
for it to finish chatting. Some messages will still pause ("ED Start") and some will abort any current talking going on ("Game refocused" for example).
* Added DoubleClickGameWindowDelayTune (TRUE/FALSE/RESET) to the Extras section. If TRUE, will give two beeps if DoubleClickGameWindowDelay is enabled, to help you fine tune the
DoubleClickGameWindowDelay value you need to abort the intro at the best possible time.
The first beep when the DoubleClickGameWindowDelay starts ... delaying and another higher beep when it actually clicks the game window.
If you have voices off and/or the ""Reset Headset"" voice off, it will also give another, slightly higher pitched beep 1 second before clicking the ResetHeadSet button, if
you have that enabled.
So you know when to look straight ahead before resetting the headset position, even with voices disabled.
If you have no voices enabled for "Reset Headset" but always wants this second beep to remind you to look straight ahead, set DoubleClickGameWindowDelayTune to RESET and it
will always (only) beep one second before resetting the headset.
* DoubleClickGameWindowDelay default value increased to 8 seconds. Seems right for my system. Can probably do with 7 seconds but 8 should be a better match for more people I guess.
* Removed the "Double left clicking again in game window." action when DoubleClickGameWindowDelay is enabled. No reason for it anymore. Saves a second on startup time.
1.8:
* Reverted the WinTitleMatchMode change done in 1.7. Some people seems to have problems with "exact" match as it does not detect the game window when its running.
Changed the default back to "Match the title from the start" mode but also made it an option as I like to have it in "Exact title match" mode.
So added option WinTitleMatchMode in the extras section of the INI.
* Added option LaunchProgramsWhenGameFound to the Extras section. If TRUE, LaunchPrograms are only executed once the game is found running. If FALSE (default), LaunchPrograms are
started when ED Runner starts (As they did pre 1.6). If this is set to FALSE, CloseLaunchPrograms will always be set to FALSE as well (or it will just close the program again..)
* LaunchPrograms can now be "remmed out" with a # in front of them. The two default programs added to the default INI on first startup are both remmed out by default now.
1.7:
* Added CloseLaunchPrograms=FALSE to INI. Setting this to TRUE will also close the programs started with LaunchPrograms, providing ED:Runner was the one that started it (wont kill
anything if all programs in LaunchPrograms were already running when the game is detected as running).
* WinTitleMatchMode changed. It now requires the exact names in EliteWindowTitle and LaunchPrograms. Previously it was partial match which could mess it up.
* Fixed a potential crash at startup if it had not checked the defined controller for at least one loop already (rare occurance).
* Removed "Activating Game" in the Voice section from the INI. Not used.
* Added option OnlySwitchOnGameClosed to the AudioDeviceSettings section. When set to TRUE, it will not switch audio device when game focus is lost, only on game open, close.
1.6:
* If enabled, Output Sound Device should now always be from the VRAudioDevice if configured. It is only switched to NormalAudioDevice after elite is dead or lost focus and only after it
finished saying what it should. Previously, you lost some messages in the VRAudioDevice as it got set to NormalAudioDevice too soon.
* If enabled, on startup, if the game is not running, the output device is set to the NormalAudioDevice If the game is running, its set to the VRAudioDevice device.
* If enabled, ProgramLaunch programs are now only launched once the game is detected and is checked on every restart of the game.
* General:ResetHeadSet & Voice:Reset Headset added to press a key to reset the headset on start of the game (not when refocusing).
* Example INI created on first launch (if no INI exists) for those who want a simple program that just monitors the joystick and do not care about all the other fluff.
* INI file notes at the bottom updated and cleaned up a bit. Only applies if you start from scratch or delete your current INI so a new one is created.
* If enabled, the DoubleClickGameWindowDelay function to skip the intro now sets the game window to AlwaysOnTop and activates it an extra time just to be sure that it does not try and
click in any of the possible programs launched with ProgramLaunch. Sometimes they pop up above the game window.
* If you accidentally hit your Windows Key or otherwise bring up your start menu, ED:Runner will fail to re activate the game window. It will detect the problem and if so, press ESC once
to first close the start menu before trying again.
* Program will no longer be paused automatically when clicking its traybar icon.
* Added ManualAudioDeviceKey in the General INI file settings. This sets a hotkey that will manually switch between VRAudioDevice and NormalAudioDevice, if those two are defined.
* Added NoAutomaticAudioSwitching to the General INI file settings. Setting this to TRUE will disable the automatic audio switcher. Useful if you only want to use the ManualAudioDeviceKey above
to switch between the audio devices.
If you feel the urge to donate, there is a "donate" button in the Joystick_Test.exe =) Thanks!
NOTE: While this program can monitor more than one joystick/controller at the same time, if you only want a specific joystick for it to react to, you might notice that the IDs of your controllers are randomized at startup if they are USB. There is no way around this. Well, not natively. I did however write a program so solve this, forcing them into specific IDs, a while back that you might want to check out: ftp://misc:misc@grandis.nu/Tur-Game_Controller_Order
It was originally made for Arcade Cabinets that use USB controllers since emulators are notorious for wanting specific controller IDs when configuring the inputs but it works just as well for this. Most people will have no need for this!
Last edited: