Ver código fonte

libretro: Use an empty base directory if the frontend doesn't provide one

When a frontend doesn't implement GET_SYSTEM_DIRECTORY, or GET_GAME_INFO, it would provide / as the base directory. This change switches it to use `""`, instead. The root directory should likely not be used as the base dir.
Rob Loach 1 ano atrás
pai
commit
3cf3681089
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      src/physfs_platform_libretro.c

+ 2 - 2
src/physfs_platform_libretro.c

@@ -112,9 +112,9 @@ char *__PHYSFS_platformCalcBaseDir(const char *argv0)
     if (dir == NULL)
         physfs_platform_libretro_environ_cb(RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY, &dir);
 
-    /* as a last case, use / */
+    /* as a last case, provide an empty string, assuming the platform resolves a working directory */
     if (dir == NULL)
-        dir = "/";
+        dir = "";
 
     dir_length = strlen(dir);
     retval = allocator.Malloc(dir_length + 2);