Wire up libamex config

This commit is contained in:
Tau
2019-05-04 13:12:20 -04:00
parent 68ec23e3c8
commit c19d140589
18 changed files with 186 additions and 64 deletions

View File

@ -27,11 +27,17 @@ static HRESULT sram_ioctl_get_geometry(struct irp *irp);
static HANDLE sram_file;
HRESULT sram_hook_init(void)
HRESULT sram_hook_init(const struct sram_config *cfg)
{
HRESULT hr;
hr = nvram_open_file(&sram_file, L"DEVICE\\sram.bin", 0x80000);
assert(cfg != NULL);
if (!cfg->enable) {
return S_FALSE;
}
hr = nvram_open_file(&sram_file, cfg->path, 0x80000);
if (FAILED(hr)) {
return hr;