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
commit c95f54f874
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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) {