This commit is contained in:
twinaphex 2020-07-31 19:25:20 +02:00
parent 5c7ba50ce1
commit 449f8dff8e
2 changed files with 9 additions and 7 deletions

View File

@ -44,6 +44,7 @@ static struct dinput_joypad_data g_pads[MAX_USERS];
static unsigned g_joypad_cnt;
static unsigned g_last_xinput_pad_idx;
/* Forward declarations */
extern LPDIRECTINPUT8 g_dinput_ctx;
extern bool g_xinput_block_pads;
extern int g_xinput_pad_indexes[MAX_USERS];
@ -193,8 +194,10 @@ static BOOL CALLBACK enum_joypad_cb(const DIDEVICEINSTANCE *inst, void *p)
#endif
return DIENUM_CONTINUE;
g_pads[g_joypad_cnt].joy_name = strdup((const char*)inst->tszProductName);
g_pads[g_joypad_cnt].joy_friendly_name = strdup((const char*)inst->tszInstanceName);
g_pads[g_joypad_cnt].joy_name =
strdup((const char*)inst->tszProductName);
g_pads[g_joypad_cnt].joy_friendly_name =
strdup((const char*)inst->tszInstanceName);
/* there may be more useful info in the GUID,
* so leave this here for a while */

View File

@ -40,9 +40,6 @@
static struct dinput_joypad_data g_pads[MAX_USERS];
static unsigned g_joypad_cnt;
/* forward declarations */
bool dinput_init_context(void);
extern LPDIRECTINPUT8 g_dinput_ctx;
#include "dinput_joypad_inl.h"
@ -64,8 +61,10 @@ static BOOL CALLBACK enum_joypad_cb(const DIDEVICEINSTANCE *inst, void *p)
#endif
return DIENUM_CONTINUE;
g_pads[g_joypad_cnt].joy_name = strdup((const char*)inst->tszProductName);
g_pads[g_joypad_cnt].joy_friendly_name = strdup((const char*)inst->tszInstanceName);
g_pads[g_joypad_cnt].joy_name =
strdup((const char*)inst->tszProductName);
g_pads[g_joypad_cnt].joy_friendly_name =
strdup((const char*)inst->tszInstanceName);
/* there may be more useful info in the GUID,
* so leave this here for a while */