Migrate Windows config files into specific config directory (#716)

This commit is contained in:
Cameron Gutman
2023-01-07 12:34:06 -06:00
committed by GitHub
parent 9b6d0b7a06
commit c95f54f874
7 changed files with 59 additions and 7 deletions

View File

@@ -29,7 +29,9 @@ namespace platf {
using adapteraddrs_t = util::c_ptr<IP_ADAPTER_ADDRESSES>;
std::filesystem::path appdata() {
return L"."sv;
WCHAR sunshine_path[MAX_PATH];
GetModuleFileNameW(NULL, sunshine_path, _countof(sunshine_path));
return std::filesystem::path { sunshine_path }.remove_filename() / L"config"sv;
}
std::string from_sockaddr(const sockaddr *const socket_address) {