/* ======================================================================================================================================= Sys_DefaultHomePath Get current home path. Returns path to ET: Legacy directory. ======================================================================================================================================= */ char *Sys_DefaultHomePath(void) { char *p; if (!*homePath) { if ((p = getenv("HOME")) != NULL) { Q_strncpyz(homePath, p, sizeof(homePath)); #ifdef __APPLE__ Q_strncpyz(homePath, OSX_ApplicationSupportPath(), sizeof(homePath)); Q_strcat(homePath, sizeof(homePath), "/etlegacy"); #else Q_strcat(homePath, sizeof(homePath), "/.etlegacy"); #endif } } return homePath; }
/** * @brief Get current home path * @return path to ET: Legacy directory */ char *Sys_DefaultHomePath(void) { char *p; if (!*homePath) { #if defined(__AROS__) || defined(__MORPHOS__) if (*(p = Sys_DefaultInstallPath()) != 0) #else if ((p = getenv("HOME")) != NULL) #endif { Q_strncpyz(homePath, p, sizeof(homePath)); #ifdef __APPLE__ Q_strncpyz(homePath, OSX_ApplicationSupportPath(), sizeof(homePath)); Q_strcat(homePath, sizeof(homePath), "/etlegacy"); #else Q_strcat(homePath, sizeof(homePath), "/.etlegacy"); #endif } } return homePath; }