Changeset View
Changeset View
Standalone View
Standalone View
source/ps/GameSetup/GameSetup.cpp
Show First 20 Lines • Show All 406 Lines • ▼ Show 20 Lines | for (size_t i = 0; i < mods.size(); ++i) | ||||
OsPath modName(mods[i]); | OsPath modName(mods[i]); | ||||
// Only mount mods from the user path if they don't exist in the 'rdata' path. | // Only mount mods from the user path if they don't exist in the 'rdata' path. | ||||
if (DirectoryExists(modPath / modName/"")) | if (DirectoryExists(modPath / modName/"")) | ||||
g_VFS->Mount(L"", modPath / modName/"", baseFlags, priority); | g_VFS->Mount(L"", modPath / modName/"", baseFlags, priority); | ||||
else | else | ||||
g_VFS->Mount(L"", modUserPath / modName/"", userFlags, priority); | g_VFS->Mount(L"", modUserPath / modName/"", userFlags, priority); | ||||
} | } | ||||
// Mount the user mod last. In dev copy, mount it with a low priority. Otherwise, make it writable. | // Mount the user data last. In dev copy, mount it with a low priority. Otherwise, make it writable. | ||||
if (InDevelopmentCopy()) | if (InDevelopmentCopy()) | ||||
g_VFS->Mount(L"", modUserPath / "user", baseFlags, 0); | g_VFS->Mount(L"", paths.UserData()/"userdata", baseFlags, 0); | ||||
else | else | ||||
g_VFS->Mount(L"", modUserPath / "user", userFlags|VFS_MOUNT_WRITABLE, priority + 1); | g_VFS->Mount(L"", paths.UserData()/"userdata", userFlags|VFS_MOUNT_WRITABLE, priority + 1); | ||||
vladislavbelov: The naming seems strange, you put `userdata` in `userdata`. | |||||
wraitiiAuthorUnsubmitted Done Inline ActionsMh, fair. wraitii: Mh, fair.
I suppose I could just name it `data/`. Would make more sense if mods were all… | |||||
} | } | ||||
static void InitVfs(const CmdLineArgs& args, int flags) | static void InitVfs(const CmdLineArgs& args, int flags) | ||||
{ | { | ||||
TIMER(L"InitVfs"); | TIMER(L"InitVfs"); | ||||
const bool setup_error = (flags & INIT_HAVE_DISPLAY_ERROR) == 0; | const bool setup_error = (flags & INIT_HAVE_DISPLAY_ERROR) == 0; | ||||
▲ Show 20 Lines • Show All 1,201 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
The naming seems strange, you put userdata in userdata.