+#if defined(__APPLE__)
+ const char* prefix = g_pGameDescription->getKeyValue("prefix");
+ if(!string_empty(prefix))
+ {
+ StringOutputStream path(256);
+ path << DirectoryCleaned(g_get_home_dir()) << "Library/Application Support" << (prefix+1) << "/";
+ if(!file_is_directory(path.c_str()))
+ {
+ path.clear();
+ path << DirectoryCleaned(g_get_home_dir()) << prefix << "/";
+ }
+ g_qeglobals.m_userEnginePath = path.c_str();
+ Q_mkdir(g_qeglobals.m_userEnginePath.c_str());
+ }
+ else
+#elif defined(POSIX)