Author: toshok
Date: 2007-12-03 21:47:39 -0500 (Mon, 03 Dec 2007)
New Revision: 90622
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/clock.cpp
trunk/moon/src/clock.h
Log:
2007-12-03 Chris Toshok <[EMAIL PROTECTED]>
* clock.h, clock.cpp: rename ClampTimeToDuration to ClampTime, as
it now clamps to [0,duration_timespan]. This fixes the Simon
"button flying off the screen" bug.
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-12-04 02:13:19 UTC (rev 90621)
+++ trunk/moon/src/ChangeLog 2007-12-04 02:47:39 UTC (rev 90622)
@@ -1,3 +1,9 @@
+2007-12-03 Chris Toshok <[EMAIL PROTECTED]>
+
+ * clock.h, clock.cpp: rename ClampTimeToDuration to ClampTime, as
+ it now clamps to [0,duration_timespan]. This fixes the Simon
+ "button flying off the screen" bug.
+
2007-12-03 Jeffrey Stedfast <[EMAIL PROTECTED]>
* clock.cpp (RaiseEnqueuedEvents): Optimized a bit by not
Modified: trunk/moon/src/clock.cpp
===================================================================
--- trunk/moon/src/clock.cpp 2007-12-04 02:13:19 UTC (rev 90621)
+++ trunk/moon/src/clock.cpp 2007-12-04 02:47:39 UTC (rev 90622)
@@ -624,17 +624,19 @@
#if false
if (GetClockState() == Clock::Active)
#endif
- ClampTimeToDuration ();
+ ClampTime ();
CalcProgress ();
}
void
-Clock::ClampTimeToDuration ()
+Clock::ClampTime ()
{
if (natural_duration.HasTimeSpan()) {
if (current_time > natural_duration.GetTimeSpan())
SetCurrentTime (natural_duration.GetTimeSpan());
}
+ if (current_time < 0)
+ SetCurrentTime (0);
}
void
@@ -1046,7 +1048,7 @@
#if false
if (GetClockState() == Clock::Active)
#endif
- ClampTimeToDuration ();
+ ClampTime ();
CalcProgress ();
Modified: trunk/moon/src/clock.h
===================================================================
--- trunk/moon/src/clock.h 2007-12-04 02:13:19 UTC (rev 90621)
+++ trunk/moon/src/clock.h 2007-12-04 02:47:39 UTC (rev 90622)
@@ -382,7 +382,7 @@
protected:
TimeSpan ComputeNewTime ();
- void ClampTimeToDuration ();
+ void ClampTime ();
void CalcProgress ();
virtual void DoRepeat ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches