1
0
mirror of https://gitea.tendokyu.moe/Hay1tsme/segatools.git synced 2024-11-12 04:40:46 +01:00

platform/vfs.c: Abort if VFS is misconfigured

This commit is contained in:
Tau 2019-11-05 20:44:00 -05:00
parent a94772b0c4
commit 48721f5418
2 changed files with 14 additions and 2 deletions

View File

@ -283,7 +283,7 @@ void vfs_config_load(struct vfs_config *cfg, const wchar_t *filename)
GetPrivateProfileStringW(
L"vfs",
L"amfs",
L"E:\\",
L"",
cfg->amfs,
_countof(cfg->amfs),
filename);
@ -291,7 +291,7 @@ void vfs_config_load(struct vfs_config *cfg, const wchar_t *filename)
GetPrivateProfileStringW(
L"vfs",
L"appdata",
L"Y:\\",
L"",
cfg->appdata,
_countof(cfg->appdata),
filename);

View File

@ -53,6 +53,18 @@ HRESULT vfs_hook_init(const struct vfs_config *config)
return S_FALSE;
}
if (config->amfs[0] == L'\0') {
dprintf("Vfs: FATAL: AMFS path not specified in INI file\n");
return E_FAIL;
}
if (config->appdata[0] == L'\0') {
dprintf("Vfs: FATAL: APPDATA path not specified in INI file\n");
return E_FAIL;
}
home_ok = GetEnvironmentVariableW(
L"USERPROFILE",
vfs_nthome_real,