A multi-platform Atari 2600 Emulator
Go to file
stephena bf6138c256 Finally implemented pause functionality. It is only enabled in X11 and SDL
versions for now, but can easily be used in other ports.  Press the PAUSE button
to activate and deactivate.

It is started by calling Console.mediaSource().pause(bool state), where state
is either true or false and will enable/disable the pause, respectively.

When pause is enabled, a mute is sent to the Sound device, so other ports must
have coded this Sound::mute method.  While pause is on, all calls to
Console.mediaSource().update() will do nothing.  Only by calling pause() again
can the emulator proceed.

Other ports will probably require a minor rewrite of their main loop, since
the calculation of frames per second will now have to be done differently.

Previously, FPS was based on the time entering the main loop and the time
leaving.  This difference was the total time used in calculating FPS.
Now, since pause can be on for an indefinite amount of time, the total time must
be incremented *per frame* instead of over the whole loop.  Similarly, the total
number of frames drawn is no longer how many times you pass through the loop, but
how many times you pass through the loop *while not paused*.

See ui/sdl/mainSDL.cxx or ui/x11/mainX11.cxx for more info.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@47 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-03-17 19:37:00 +00:00
CVSROOT Add syncmail as a admin file to checkout. 2001-12-27 20:02:13 +00:00
stella Finally implemented pause functionality. It is only enabled in X11 and SDL 2002-03-17 19:37:00 +00:00