divahook: Add an option to disable slider emulation

This commit is contained in:
dogtopus
2019-12-29 13:28:32 -04:00
parent f732eb05a8
commit 0c74d64d5c
5 changed files with 26 additions and 3 deletions

View File

@ -37,8 +37,13 @@ static struct uart slider_uart;
static uint8_t slider_written_bytes[520];
static uint8_t slider_readable_bytes[520];
HRESULT slider_hook_init(void)
HRESULT slider_hook_init(const struct slider_config *cfg)
{
assert(cfg != NULL);
if (!cfg->enable) {
return S_FALSE;
}
InitializeCriticalSection(&slider_lock);
uart_init(&slider_uart, 11);