Set the current active runtime when a headset connects

This commit is contained in:
Guillaume Meunier
2024-02-19 23:36:28 +01:00
parent a5a1ad1cbd
commit 9efe3852f4
10 changed files with 180 additions and 41 deletions
+3 -13
View File
@@ -31,26 +31,16 @@
#include "util/u_logging.h"
#include "configuration.h"
static std::filesystem::path get_config_base_dir()
{
const char * xdg_config_home = std::getenv("XDG_CONFIG_HOME");
if (xdg_config_home)
return xdg_config_home;
const char * home = std::getenv("HOME");
if (home)
return std::filesystem::path(home) / ".config";
return ".";
}
#include "utils/xdg_base_directory.h"
static std::filesystem::path get_config_file()
{
return get_config_base_dir() / "wivrn" / "config.json";
return xdg_config_home() / "wivrn" / "config.json";
}
static std::filesystem::path get_cookie_file()
{
return get_config_base_dir() / "wivrn" / "cookie";
return xdg_config_home() / "wivrn" / "cookie";
}
namespace xrt::drivers::wivrn