Add port and hostname config options
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
@@ -204,6 +204,12 @@ configuration::configuration()
|
||||
if (auto it = json.find("tcp-only"); it != json.end())
|
||||
tcp_only = *it;
|
||||
|
||||
if (auto it = json.find("port"); it != json.end())
|
||||
port = *it;
|
||||
|
||||
if (auto it = json.find("hostname"); it != json.end())
|
||||
hostname = *it;
|
||||
|
||||
if (auto it = json.find("publish-service"); it != json.end())
|
||||
{
|
||||
publication = *it;
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "hostname.h"
|
||||
#include "wivrn_config.h"
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
#include <filesystem>
|
||||
@@ -57,6 +59,8 @@ struct configuration
|
||||
bool use_steamvr_lh = false;
|
||||
bool hid_forwarding = false;
|
||||
bool tcp_only = false;
|
||||
int port = wivrn::default_port;
|
||||
std::string hostname = wivrn::hostname();
|
||||
service_publication publication = service_publication::avahi;
|
||||
|
||||
// monostate: default value, string: user defined, nullptr: disabled
|
||||
|
||||
Reference in New Issue
Block a user