Make VRServer config path variable

Add a constructor that accepts a path to the config file
This commit is contained in:
Michael Gschwandtner committed 2022-04-12 00:37:46 +02:00
1 parent 7b700b4a0c
commit 1723d19882
1 file changed
+7 -1
+7 -1
View File
@@ -49,9 +49,15 @@ public class VRServer extends Thread {
private final List<Consumer<Tracker>> newTrackersConsumers = new FastList<>();
private final List<Runnable> onTick = new FastList<>();
private final List<? extends ShareableTracker> shareTrackers;
private String m_configPath;
public VRServer() {
this("vrconfig.yml");
}
public VRServer(String configPath) {
super("VRServer");
m_configPath = configPath;
loadConfig();
hmdTracker = new HMDTracker("HMD");
hmdTracker.position.set(0, 1.8f, 0); // Set starting position for easier debugging