From afab51e9acadb888eb45f7a88b0ec90baad6f076 Mon Sep 17 00:00:00 2001 From: Jeroen Date: Mon, 21 Aug 2023 21:49:35 +0200 Subject: [PATCH] check for windows specific home directory --- src/yuzu/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 104f299c93..5552e8ad98 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2677,7 +2677,11 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga std::filesystem::path target_directory{}; // Determine target directory for shortcut +#if defined(WIN32) + const char* home = std::getenv("USERPROFILE"); +#else const char* home = std::getenv("HOME"); +#endif const std::filesystem::path home_path = (home == nullptr ? "~" : home); const char* xdg_data_home = std::getenv("XDG_DATA_HOME");