platform: Wire up configuration

This commit is contained in:
Tau
2019-05-17 23:10:09 -04:00
parent e935c22206
commit 5722061cbf
13 changed files with 287 additions and 27 deletions

View File

@ -8,6 +8,8 @@
#include "hooklib/dll.h"
#include "hooklib/reg.h"
#include "platform/amvideo.h"
#include "util/dprintf.h"
/* Hook functions */
@ -96,10 +98,16 @@ static const struct hook_symbol amvideo_syms[] = {
}
};
HRESULT amvideo_hook_init(HMODULE redir_mod)
HRESULT amvideo_hook_init(const struct amvideo_config *cfg, HMODULE redir_mod)
{
HRESULT hr;
assert(cfg != NULL);
if (!cfg->enable) {
return S_FALSE;
}
hr = reg_hook_push_key(
HKEY_LOCAL_MACHINE,
L"SYSTEM\\SEGA\\SystemProperty\\amVideo",