From f487fa1366b713be5ff9d6ec2a1c38f430c57323 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 17 Jan 2020 20:03:50 -0800 Subject: [PATCH] Use hostname as the default Sunshine name --- assets/sunshine.conf | 3 ++- sunshine/config.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/assets/sunshine.conf b/assets/sunshine.conf index 15237110..6a06d1af 100644 --- a/assets/sunshine.conf +++ b/assets/sunshine.conf @@ -8,7 +8,8 @@ # cert = /dir/cert.pem # The name displayed by Moonlight -sunshine_name = Sunshine +# If not specified, the PC's hostname is used +# sunshine_name = Sunshine # The minimum log level printed to standard out # diff --git a/sunshine/config.cpp b/sunshine/config.cpp index 6d2c315e..9886547a 100644 --- a/sunshine/config.cpp +++ b/sunshine/config.cpp @@ -3,6 +3,8 @@ #include #include +#include + #include "utility.h" #include "config.h" @@ -41,7 +43,7 @@ nvhttp_t nvhttp { PRIVATE_KEY_FILE, CERTIFICATE_FILE, - "sunshine"s, // sunshine_name, + boost::asio::ip::host_name(), // sunshine_name, "03904e64-51da-4fb3-9afd-a9f7ff70fea4"s, // unique_id "devices.json"s // file_devices };