Add setting to disable merge for specific VID/PID.

For example J-PAC in dual X-input mode with VID/PID 045e:028e
This commit is contained in:
paulb-nl
2020-08-15 22:29:13 +02:00
committed by GitHub
parent d0c7abc012
commit ddb3a8847e
3 changed files with 9 additions and 0 deletions

View File

@@ -72,6 +72,8 @@ static const ini_var_t ini_vars[] =
{ "BROWSE_EXPAND", (void*)(&(cfg.browse_expand)), UINT8, 0, 1 },
{ "LOGO", (void*)(&(cfg.logo)), UINT8, 0, 1 },
{ "SHARED_FOLDER", (void*)(&(cfg.shared_folder)), STRING, 0, sizeof(cfg.shared_folder) - 1 },
{ "NO_MERGE_VID", (void*)(&(cfg.no_merge_vid)), UINT16, 0, 0xFFFF },
{ "NO_MERGE_PID", (void*)(&(cfg.no_merge_pid)), UINT16, 0, 0xFFFF },
};
static const int nvars = (int)(sizeof(ini_vars) / sizeof(ini_var_t));

2
cfg.h
View File

@@ -42,6 +42,8 @@ typedef struct {
uint8_t recents;
uint16_t jamma_vid;
uint16_t jamma_pid;
uint16_t no_merge_vid;
uint16_t no_merge_pid;
uint8_t sniper_mode;
uint8_t browse_expand;
uint8_t logo;

View File

@@ -2724,6 +2724,11 @@ void mergedevs()
make_unique(0x0E8F, 0x3013, 1); // Mayflash SNES controller 2 port adapter
make_unique(0x16C0, 0x05E1, 1); // XinMo XM-10 2 player USB Encoder
if (cfg.no_merge_vid)
{
make_unique(cfg.no_merge_vid, cfg.no_merge_pid, (cfg.no_merge_pid ? 1 : 0));
}
// merge multifunctional devices by id
for (int i = 0; i < NUMDEV; i++)
{