Browse Source

Need to initialize stuff *after* knowing the number of players.

pull/5/head
Raphael Assenat 6 years ago
parent
commit
d7bdf59860
  1. 30
      main.c

30
main.c

@ -454,21 +454,6 @@ int main(void) @@ -454,21 +454,6 @@ int main(void)
eeprom_init();
intervaltimer_init();
for (i=0; i<num_players; i++) {
int hid_iface_id;
usbpad_init(&usbpads[i]);
// Skip interface 1 (always used for the dataReport)
if (i>0) {
hid_iface_id = i + 1;
} else {
hid_iface_id = i;
}
usb_params.hid_params[hid_iface_id].ctx = &usbpads[i];
}
switch (g_eeprom_data.cfg.mode)
{
default:
@ -513,6 +498,21 @@ int main(void) @@ -513,6 +498,21 @@ int main(void)
break;
}
for (i=0; i<num_players; i++) {
int hid_iface_id;
usbpad_init(&usbpads[i]);
// Skip interface 1 (always used for the dataReport)
if (i>0) {
hid_iface_id = i + 1;
} else {
hid_iface_id = i;
}
usb_params.hid_params[hid_iface_id].ctx = &usbpads[i];
}
sei();
usb_init(&usb_params);

Loading…
Cancel
Save