+const char *getLastModelFolderPath()
+{
+ if (g_strLastModelFolder.empty()) {
+ GlobalPreferenceSystem().registerPreference("LastModelFolder", make_property_string(g_strLastModelFolder));
+ if (g_strLastModelFolder.empty()) {
+ StringOutputStream buffer(1024);
+ buffer << g_qeglobals.m_userGamePath.c_str() << "models/";
+ if (!file_readable(buffer.c_str())) {
+ // just go to fsmain
+ buffer.clear();
+ buffer << g_qeglobals.m_userGamePath.c_str() << "/";
+ }
+ g_strLastModelFolder = buffer.c_str();
+ }