diff --git a/stella/src/emucore/TrackBall.cxx b/stella/src/emucore/TrackBall.cxx index e79a0d31c..cba37fde2 100644 --- a/stella/src/emucore/TrackBall.cxx +++ b/stella/src/emucore/TrackBall.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: TrackBall.cxx,v 1.1 2008-05-12 22:40:25 stephena Exp $ +// $Id: TrackBall.cxx,v 1.2 2008-05-19 03:15:12 stephena Exp $ //============================================================================ #include "Event.hxx" @@ -154,6 +154,13 @@ void TrackBall::update() myDigitalPinState[Six] = (myEvent.get(Event::MouseButtonValue) == 0); } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void TrackBall::systemCyclesReset() +{ + myCyclesWhenSWCHARead -= mySystem.cycles(); +} + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt32 TrackBall::ourTrakBallTableTB_H[2][2] = { { 0x40, 0x00 }, { 0xc0, 0x80 } diff --git a/stella/src/emucore/TrackBall.hxx b/stella/src/emucore/TrackBall.hxx index e4a9502ed..1eb4f212a 100644 --- a/stella/src/emucore/TrackBall.hxx +++ b/stella/src/emucore/TrackBall.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: TrackBall.hxx,v 1.1 2008-05-12 22:40:25 stephena Exp $ +// $Id: TrackBall.hxx,v 1.2 2008-05-19 03:15:12 stephena Exp $ //============================================================================ #ifndef TRACKBALL_HXX @@ -35,7 +35,7 @@ AmigaMouse: Amiga Mouse @author Stephen Anthony & z26 team - @version $Id: TrackBall.hxx,v 1.1 2008-05-12 22:40:25 stephena Exp $ + @version $Id: TrackBall.hxx,v 1.2 2008-05-19 03:15:12 stephena Exp $ */ class TrackBall : public Controller { @@ -70,6 +70,13 @@ class TrackBall : public Controller */ virtual void update(); + /** + Notification method invoked by the system right before the + system resets its cycle counter to zero. It may be necessary + to override this method for devices that remember cycle counts. + */ + virtual void systemCyclesReset(); + private: // Counter to iterate through the gray codes int myHCounter, myVCounter;