1
0
mirror of synced 2024-12-18 07:05:52 +01:00
bananatools/platform/platform.c
2023-03-10 02:46:37 -05:00

68 lines
1.1 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,
struct dongle_info d_info
)
{
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, d_info.vid, d_info.pid, d_info.manufacturer, d_info.product);
if (FAILED(hr)) {
return hr;
}
return S_OK;
}