// add it in.
if (Gamepad::numJoysticks == 0)
{
- ConnectProfileToDevice(0);
+#ifdef DEBUG_PROFILES
+printf("AutoConnect: Setting up keyboard...\n");
+#endif
+//NO! ConnectProfileToDevice(0);
+#warning "!!! Need to set up scanning for multiple keyboard profiles !!!"
+ ConnectProfileToController(0, 0);
return;
}
{
int deviceNum = FindDeviceNumberForName(Gamepad::GetJoystickName(i));
// bool p1Overwriteable =
+#ifdef DEBUG_PROFILES
+printf("AutoConnect: Attempting to set up profile for device '%s' (%i)\n", Gamepad::GetJoystickName(i), deviceNum);
+#endif
for(int j=0; j<numberOfProfiles; j++)
{
// N.B.: The keyboard is always mapped to profile #0, so we can locate it
// easily. :-)
int slot = profile[0].preferredSlot;
+#ifdef DEBUG_PROFILES
+printf("AutoConnect: Attempting to connect keyboard... (gamepadIDSlot1/2 = %i/%i)\n", gamepadIDSlot1, gamepadIDSlot2);
+#endif
if ((slot == CONTROLLER1) && (gamepadIDSlot1 == -1))
controller1Profile = 0;
controller2Profile = 0;
}
+#ifdef DEBUG_PROFILES
+printf("AutoConnect: Profiles found: [%i, %i]\n", controller1Profile, controller2Profile);
+#endif
// Finally, attempt to connect profiles to controllers
ConnectProfileToController(controller1Profile, 0);
ConnectProfileToController(controller2Profile, 1);
}
+//unused...
int ConnectProfileToDevice(int deviceNum, int gamepadID/*= -1*/)
{
// bool found1 = false;