bananatools/platform/platform.c

67 lines
1.0 KiB
C

#include "platform/platform.h"
HRESULT platform_hook_init(
const struct platform_config *cfg,
enum platform_type type,
jvs_provider_t jvs,
HMODULE redir_mod
)
{
HRESULT hr;
assert(cfg != NULL);
assert(redir_mod != NULL);
hr = netenv_hook_init(&cfg->netenv);
if (FAILED(hr)) {
return hr;
}
hr = locale_hook_init(&cfg->locale);
if (FAILED(hr)) {
return hr;
}
hr = clock_hook_init(&cfg->clock);
if (FAILED(hr)) {
return hr;
}
hr = dns_platform_hook_init(&cfg->dns);
if (FAILED(hr)) {
return hr;
}
if (jvs != NULL) {
hr = jvs_hook_init(&cfg->jvs, jvs);
if (FAILED(hr)) {
return hr;
}
}
hr = misc_hook_init(&cfg->misc);
if (FAILED(hr)) {
return hr;
}
hr = vfs_hook_init(&cfg->vfs);
if (FAILED(hr)) {
return hr;
}
hr = es3sec_hook_init(&cfg->dongle, "", "");
if (FAILED(hr)) {
return hr;
}
return S_OK;
}