hooklib: Allow proper passthrough of serial calls to real hardware (#26)

Only enabled / tested on IIDX CB and SDVX5

The point of this, is to allow rs232 hooks for only the descriptors that we hook.
This is because the emulation here is incomplete.
Although the IOCTL's do end up being passed to the real hardware, the game rejects some of the responses and hangs.
By short circuiting out, and calling the real Comm functions instead, it works.
And hence, card-reader passthrough works on IIDX25+/SDVX5+ finally without eamio-real
This commit is contained in:
Will Xyen
2019-09-28 17:36:22 -04:00
parent 1a567aa8ba
commit 89e3bbd2a3
5 changed files with 139 additions and 0 deletions
+15
View File
@@ -1,6 +1,21 @@
#ifndef HOOKLIB_RS232_H
#define HOOKLIB_RS232_H
#include <windows.h>
void rs232_hook_init(void);
/**
* Allows limiting the rs232 to only the specified fd's
*/
void rs232_hook_limit_hooks(void);
/**
* Adds the specified fd to the list of descriptors to hook
*
* @param fd descriptor to hook
*/
void rs232_hook_add_fd(HANDLE fd);
#endif