private void updateButtons(Pointer.PointerButtonState oldButtons, Pointer.PointerButtonState newButtons)
 {
     // pressed something
     if (oldButtons == Pointer.PointerButtonState.Nothing)
     {
         // pressed and released this frame
         if ((newButtons & Pointer.PointerButtonState.AnyButtonPressed) == 0)
         {
             // Add pressed buttons for processing
             mousePointer.Buttons = PointerUtils.PressDownButtons(newButtons);
             pressPointer(mousePointer);
             internalReleaseMousePointer(newButtons);
         }
         // pressed this frame
         else
         {
             mousePointer.Buttons = newButtons;
             pressPointer(mousePointer);
         }
     }
     // released or button state changed
     else
     {
         // released this frame
         if ((newButtons & Pointer.PointerButtonState.AnyButtonPressed) == 0)
         {
             mousePointer.Buttons = newButtons;
             internalReleaseMousePointer(newButtons);
         }
         // button state changed this frame
         else
         {
             mousePointer.Buttons = newButtons;
             updatePointer(mousePointer);
         }
     }
 }