Similar to the last commit, added cycle resetting the TrackBall class.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1519 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2008-05-19 03:15:12 +00:00
parent f35ef466c6
commit b270f7f231
2 changed files with 17 additions and 3 deletions

View File

@ -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 }

View File

@ -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;