Exemplo n.º 1
0
static int _glfwJoystickPresent( int joy )
{
    JOYINFO ji;

    // Windows NT 4.0 MMSYSTEM only supports 2 sticks (other Windows
    // versions support 16 sticks)
    if( _glfwSys.WinVer == _GLFW_WIN_NT4 && joy > GLFW_JOYSTICK_2 )
    {
        return GL_FALSE;
    }

    // Is it a valid stick ID (Windows don't support more than 16 sticks)?
    if( joy < GLFW_JOYSTICK_1 || joy > GLFW_JOYSTICK_16 )
    {
        return GL_FALSE;
    }

    // Is the joystick present?
    if( _glfw_joyGetPos( joy - GLFW_JOYSTICK_1, &ji ) != JOYERR_NOERROR )
    {
        return GL_FALSE;
    }

    return GL_TRUE;
}
Exemplo n.º 2
0
int _glfwPlatformJoystickPresent(int joy)
{
    JOYINFO ji;

    if (_glfw_joyGetPos(joy, &ji) != JOYERR_NOERROR)
        return GL_FALSE;

    return GL_TRUE;
}
Exemplo n.º 3
0
static GLboolean isJoystickPresent(int joy)
{
    JOYINFO ji;

    // Is it a valid stick ID (Windows don't support more than 16 sticks)?
    if (joy < GLFW_JOYSTICK_1 || joy > GLFW_JOYSTICK_16)
        return GL_FALSE;

    // Is the joystick present?
    if (_glfw_joyGetPos(joy - GLFW_JOYSTICK_1, &ji) != JOYERR_NOERROR)
        return GL_FALSE;

    return GL_TRUE;
}