Code: Select all
void JoystickController::OnJoystickEvent(wxJoystickEvent& event) {
//Get id of changed stick and index it from 0
int stickId = event.GetJoystick();
cout << "stickId: " << stickId << "\n";
cout << "ONE: " << wxJOYSTICK1 << "\n";
cout << "TWO: " << wxJOYSTICK2 << "\n";
}
Code: Select all
stickId: 1
ONE: 0
TWO: 1
stickId: 2
ONE: 0
TWO: 1
On a separate computer, the value of GetJoystick is indeed 0, and 1. What is causing this?Returns the identifier of the joystick generating the event - one of wxJOYSTICK1 and wxJOYSTICK2.