示例#1
0
SetJoystick::~SetJoystick()
{
    deleteSticks();
    deleteVDpads();
    deleteButtons();
    deleteAxes();
    deleteHats();
}
示例#2
0
void SetJoystick::refreshAxes()
{
    deleteAxes();

    //for (int i=0; i < SDL_JoystickNumAxes(joyhandle); i++)
    for (int i=0; i < device->getNumberRawAxes(); i++)
    {
        JoyAxis *axis = new JoyAxis(i, index, this);
        axes.insert(i, axis);
        enableAxisConnections(axis);
    }
}
示例#3
0
void SetJoystick::refreshAxes()
{
    deleteAxes();

    InputDevice *device = getInputDevice();
    for (int i=0; i < device->getNumberRawAxes(); i++)
    {
        JoyAxis *axis = new JoyAxis(i, index, this, this);
        axes.insert(i, axis);

        if (device->hasCalibrationThrottle(i))
        {
            JoyAxis::ThrottleTypes throttle = device->getCalibrationThrottle(i);
            axis->setInitialThrottle(throttle);
        }

        enableAxisConnections(axis);
    }
}