mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-21 09:31:20 -08:00
Rename configPath variable
This commit is contained in:
1 parent
1723d19882
commit
c77d73c460
6 files changed
+56
-40
No files matched your search
@@ -49,7 +49,8 @@ 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;
|
||||
private String configPath;
|
||||
|
||||
|
||||
public VRServer() {
|
||||
this("vrconfig.yml");
|
||||
@@ -57,7 +58,7 @@ public class VRServer extends Thread {
|
||||
|
||||
public VRServer(String configPath) {
|
||||
super("VRServer");
|
||||
m_configPath = configPath;
|
||||
this.configPath = configPath;
|
||||
loadConfig();
|
||||
hmdTracker = new HMDTracker("HMD");
|
||||
hmdTracker.position.set(0, 1.8f, 0); // Set starting position for easier debugging
|
||||
@@ -136,7 +137,7 @@ public class VRServer extends Thread {
|
||||
|
||||
private void loadConfig() {
|
||||
try {
|
||||
config.load(new FileInputStream(new File("vrconfig.yml")));
|
||||
config.load(new FileInputStream(new File(this.configPath)));
|
||||
} catch(FileNotFoundException e) {
|
||||
// Config file didn't exist, is not an error
|
||||
} catch(YamlException e) {
|
||||
@@ -208,7 +209,7 @@ public class VRServer extends Thread {
|
||||
tc.saveConfig(new YamlNode(cfg));
|
||||
}
|
||||
}
|
||||
File cfgFile = new File("vrconfig.yml");
|
||||
File cfgFile = new File(this.configPath);
|
||||
try {
|
||||
config.save(new FileOutputStream(cfgFile));
|
||||
} catch(IOException e) {
|
||||
|
||||
Reference in new issue
Block a user