mirror of
https://gitea.tendokyu.moe/Hay1tsme/segatools.git
synced 2024-11-14 13:37:38 +01:00
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(
|
GetPrivateProfileStringW(
|
||||||
L"vfs",
|
L"vfs",
|
||||||
L"amfs",
|
L"amfs",
|
||||||
L"E:\\",
|
L"",
|
||||||
cfg->amfs,
|
cfg->amfs,
|
||||||
_countof(cfg->amfs),
|
_countof(cfg->amfs),
|
||||||
filename);
|
filename);
|
||||||
@ -291,7 +291,7 @@ void vfs_config_load(struct vfs_config *cfg, const wchar_t *filename)
|
|||||||
GetPrivateProfileStringW(
|
GetPrivateProfileStringW(
|
||||||
L"vfs",
|
L"vfs",
|
||||||
L"appdata",
|
L"appdata",
|
||||||
L"Y:\\",
|
L"",
|
||||||
cfg->appdata,
|
cfg->appdata,
|
||||||
_countof(cfg->appdata),
|
_countof(cfg->appdata),
|
||||||
filename);
|
filename);
|
||||||
|
@ -53,6 +53,18 @@ HRESULT vfs_hook_init(const struct vfs_config *config)
|
|||||||
return S_FALSE;
|
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(
|
home_ok = GetEnvironmentVariableW(
|
||||||
L"USERPROFILE",
|
L"USERPROFILE",
|
||||||
vfs_nthome_real,
|
vfs_nthome_real,
|
||||||
|
Loading…
Reference in New Issue
Block a user