forked from Hay1tsme/segatools
platform/vfs.c: Abort if VFS is misconfigured
This commit is contained in:
parent
a94772b0c4
commit
48721f5418
@ -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);
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user