check for windows specific home directory
This commit is contained in:
parent
e88f16f8a2
commit
afab51e9ac
1 changed files with 4 additions and 0 deletions
|
@ -2677,7 +2677,11 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga
|
||||||
|
|
||||||
std::filesystem::path target_directory{};
|
std::filesystem::path target_directory{};
|
||||||
// Determine target directory for shortcut
|
// Determine target directory for shortcut
|
||||||
|
#if defined(WIN32)
|
||||||
|
const char* home = std::getenv("USERPROFILE");
|
||||||
|
#else
|
||||||
const char* home = std::getenv("HOME");
|
const char* home = std::getenv("HOME");
|
||||||
|
#endif
|
||||||
const std::filesystem::path home_path = (home == nullptr ? "~" : home);
|
const std::filesystem::path home_path = (home == nullptr ? "~" : home);
|
||||||
const char* xdg_data_home = std::getenv("XDG_DATA_HOME");
|
const char* xdg_data_home = std::getenv("XDG_DATA_HOME");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue