src/platform_beos.cpp
changeset 1242 1e6db80d2393
parent 1240 22d4d1bd4e21
child 1246 4fa9fe3e0b52
--- a/src/platform_beos.cpp	Tue Mar 20 15:44:10 2012 -0400
+++ b/src/platform_beos.cpp	Wed Mar 21 23:30:50 2012 -0400
@@ -183,6 +183,19 @@
 } /* __PHYSFS_platformCalcBaseDir */
 
 
+char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app)
+{
+    /* !!! FIXME: there's a real API to determine this */
+    const char *userdir = __PHYSFS_getUserDir();
+    const char *append = "config/settings/";
+    const size_t len = strlen(userdir) + strlen(append) + strlen(app) + 1;
+    char *retval = allocator.Malloc(len);
+    BAIL_IF_MACRO(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    snprintf(retval, len, "%s%s%s", userdir, append, app);
+    return retval;
+} /* __PHYSFS_platformCalcPrefDir */
+
+
 void *__PHYSFS_platformGetThreadID(void)
 {
     return (void *) find_thread(NULL);