idac: add ffb emulation

This commit is contained in:
2024-09-30 18:50:46 +02:00
parent 53fb8c28ea
commit c06bb408e7
26 changed files with 930 additions and 149 deletions

20
board/ffb.h Normal file
View File

@ -0,0 +1,20 @@
#pragma once
#include <windows.h>
#include <stdbool.h>
struct ffb_config {
bool enable;
};
struct ffb_ops {
void (*toggle)(bool active);
void (*constant_force)(uint8_t direction, uint8_t force);
void (*rumble)(uint8_t force, uint8_t period);
void (*damper)(uint8_t force);
};
HRESULT ffb_hook_init(
const struct ffb_config *cfg,
const struct ffb_ops *ops,
unsigned int port_no);