Пример #1
0
static void disableMouseCursor( void )
{
    if( !_glfwWin.opened || _glfwWin.mouseLock )
    {
        return;
    }

    // Hide mouse cursor
    _glfwPlatformHideMouseCursor();

    // From now on the mouse is locked
    _glfwWin.mouseLock = GL_TRUE;
}
Пример #2
0
static void disableMouseCursor( void )
{
    if( !_glfwWin.opened || _glfwWin.mouseLock )
    {
        return;
    }

    // Hide mouse cursor
    _glfwPlatformHideMouseCursor();

    // Move cursor to the middle of the window
    _glfwPlatformSetMouseCursorPos( _glfwWin.width >> 1,
                                    _glfwWin.height >> 1 );

    // From now on the mouse is locked
    _glfwWin.mouseLock = GL_TRUE;
}