0001-fixed-logic-error.patch 1.5 KB

12345678910111213141516171819202122232425262728
  1. From bd47a2dcbdbe4402675b4250911417dd7860338b Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
  3. Date: Fri, 19 Oct 2012 13:12:57 +0200
  4. Subject: [PATCH] fixed logic error
  5. ---
  6. OBSlider/OBSlider.m | 4 ++--
  7. 1 file changed, 2 insertions(+), 2 deletions(-)
  8. diff --git a/OBSlider/OBSlider.m b/OBSlider/OBSlider.m
  9. index f4d1586..53d880a 100644
  10. --- a/OBSlider/OBSlider.m
  11. +++ b/OBSlider/OBSlider.m
  12. @@ -127,8 +127,8 @@
  13. CGRect trackRect = [self trackRectForBounds:self.bounds];
  14. realPositionValue = realPositionValue + (self.maximumValue - self.minimumValue) * (trackingOffset / trackRect.size.width);
  15. - if ( (self.beganTrackingLocation.y < currentLocation.y) && (currentLocation.y < previousLocation.y) ||
  16. - (self.beganTrackingLocation.y > currentLocation.y) && (currentLocation.y > previousLocation.y) )
  17. + if ( ((self.beganTrackingLocation.y < currentLocation.y) && (currentLocation.y < previousLocation.y)) ||
  18. + ((self.beganTrackingLocation.y > currentLocation.y) && (currentLocation.y > previousLocation.y)) )
  19. {
  20. // We are getting closer to the slider, go closer to the real location
  21. self.value = self.value + self.scrubbingSpeed * (self.maximumValue - self.minimumValue) * (trackingOffset / trackRect.size.width) + (realPositionValue - self.value) / ( 1 + fabsf(currentLocation.y - self.beganTrackingLocation.y));
  22. --
  23. 1.7.10.2 (Apple Git-33)