mirror of
https://github.com/raphnet/gc_n64_usb-v3
synced 2024-12-21 14:58:51 -05:00
Gamecube hotplugging infrastructure
This commit is contained in:
parent
db8d973b82
commit
4a6ccfb448
@ -156,6 +156,11 @@ static char gamecubeUpdate()
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void gamecubeHotplug(void)
|
||||
{
|
||||
// Make sure next read becomes the refence center values
|
||||
origins_set = 0;
|
||||
}
|
||||
|
||||
static char gamecubeProbe(void)
|
||||
{
|
||||
@ -191,6 +196,7 @@ Gamepad GamecubeGamepad = {
|
||||
.getReport = gamecubeGetReport,
|
||||
.probe = gamecubeProbe,
|
||||
.setVibration = gamecubeVibration,
|
||||
.hotplug = gamecubeHotplug,
|
||||
};
|
||||
|
||||
Gamepad *gamecubeGetGamepad(void)
|
||||
|
@ -75,6 +75,7 @@ typedef struct {
|
||||
void (*init)(void);
|
||||
char (*update)(void);
|
||||
char (*changed)(void);
|
||||
void (*hotplug)(void);
|
||||
void (*getReport)(gamepad_data *dst);
|
||||
void (*setVibration)(char enable);
|
||||
char (*probe)(void); /* return true if found */
|
||||
|
Loading…
Reference in New Issue
Block a user