diff --git a/stella/src/emucore/Console.cxx b/stella/src/emucore/Console.cxx index 6f3cd67ee..4fcaec4a4 100644 --- a/stella/src/emucore/Console.cxx +++ b/stella/src/emucore/Console.cxx @@ -8,12 +8,12 @@ // SS SS tt ee ll ll aa aa // SSSS ttt eeeee llll llll aaaaa // -// Copyright (c) 1995-2002 by Bradford W. Mott +// Copyright (c) 1995-2004 by Bradford W. Mott // // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: Console.cxx,v 1.28 2004-05-28 22:07:57 stephena Exp $ +// $Id: Console.cxx,v 1.29 2004-06-13 04:59:40 bwmott Exp $ //============================================================================ #include @@ -52,11 +52,12 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Console::Console(const uInt8* image, uInt32 size, const char* filename, Settings& settings, PropertiesSet& propertiesSet, - FrameBuffer& framebuffer, Sound& sound) + FrameBuffer& framebuffer, Sound& sound, uInt32 frameRate) : mySettings(settings), myPropSet(propertiesSet), myFrameBuffer(framebuffer), - mySound(sound) + mySound(sound), + myFrameRate(frameRate) { myControllers[0] = 0; myControllers[1] = 0; @@ -224,6 +225,12 @@ FrameBuffer& Console::frameBuffer() const return myFrameBuffer; } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +uInt32 Console::frameRate() const +{ + return myFrameRate; +} + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sound& Console::sound() const { diff --git a/stella/src/emucore/Console.hxx b/stella/src/emucore/Console.hxx index ea64279af..b69b5b612 100644 --- a/stella/src/emucore/Console.hxx +++ b/stella/src/emucore/Console.hxx @@ -8,12 +8,12 @@ // SS SS tt ee ll ll aa aa // SSSS ttt eeeee llll llll aaaaa // -// Copyright (c) 1995-2002 by Bradford W. Mott +// Copyright (c) 1995-2004 by Bradford W. Mott // // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: Console.hxx,v 1.17 2003-12-04 19:18:45 stephena Exp $ +// $Id: Console.hxx,v 1.18 2004-06-13 04:59:40 bwmott Exp $ //============================================================================ #ifndef CONSOLE_HXX @@ -41,7 +41,7 @@ class FrameBuffer; This class represents the entire game console. @author Bradford W. Mott - @version $Id: Console.hxx,v 1.17 2003-12-04 19:18:45 stephena Exp $ + @version $Id: Console.hxx,v 1.18 2004-06-13 04:59:40 bwmott Exp $ */ class Console { @@ -57,10 +57,11 @@ class Console @param profiles The game profiles object to use @param framebuffer The framebuffer object to use @param sound The sound object to use + @param framerate The framerate being used */ Console(const uInt8* image, uInt32 size, const char* filename, Settings& settings, PropertiesSet& propertiesSet, - FrameBuffer& framebuffer, Sound& sound); + FrameBuffer& framebuffer, Sound& sound, uInt32 frameRate); /** Create a new console object by copying another one @@ -112,6 +113,11 @@ class Console */ FrameBuffer& frameBuffer() const; + /** + Get the frame rate for the emulation + */ + uInt32 frameRate() const; + /** Get the sound object of the console @@ -269,6 +275,9 @@ class Console // Reference to the Sound object Sound& mySound; + // Frame rate being used by the emulator + uInt32 myFrameRate; + // Pointer to the EventHandler object EventHandler* myEventHandler;