Fixed issue in last commit with having to specify the framerate before

a console was actually created.  It's now specified as part of the console
initialization, and updated values are seen everywhere.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1270 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2007-01-06 16:28:38 +00:00
parent 40f333129b
commit 7c5e5af3f4
3 changed files with 5 additions and 11 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: FrameBuffer.cxx,v 1.115 2007-01-01 18:04:48 stephena Exp $
// $Id: FrameBuffer.cxx,v 1.116 2007-01-06 16:28:38 stephena Exp $
//============================================================================
#include <sstream>
@ -44,7 +44,6 @@ FrameBuffer::FrameBuffer(OSystem* osystem)
theRedrawTIAIndicator(true),
myUsePhosphor(false),
myPhosphorBlend(77),
myFrameRate(0),
myInitializedCount(0)
{
}
@ -63,7 +62,6 @@ void FrameBuffer::initialize(const string& title, uInt32 width, uInt32 height,
myBaseDim.x = myBaseDim.y = 0;
myBaseDim.w = (uInt16) width;
myBaseDim.h = (uInt16) height;
myFrameRate = myOSystem->frameRate();
// Now (re)initialize the SDL video system
// These things only have to be done one per FrameBuffer creation
@ -206,7 +204,7 @@ void FrameBuffer::showMessage(const string& message, MessagePosition position,
// Precompute the message coordinates
myMessage.text = message;
myMessage.counter = myFrameRate << 1; // Show message for 2 seconds
myMessage.counter = myOSystem->frameRate() << 1; // Show message for 2 seconds
myMessage.color = color;
myMessage.w = myOSystem->font().getStringWidth(myMessage.text) + 10;

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: FrameBuffer.hxx,v 1.84 2007-01-01 18:04:48 stephena Exp $
// $Id: FrameBuffer.hxx,v 1.85 2007-01-06 16:28:38 stephena Exp $
//============================================================================
#ifndef FRAMEBUFFER_HXX
@ -93,7 +93,7 @@ struct Scaler {
All GUI elements (ala ScummVM) are drawn here as well.
@author Stephen Anthony
@version $Id: FrameBuffer.hxx,v 1.84 2007-01-01 18:04:48 stephena Exp $
@version $Id: FrameBuffer.hxx,v 1.85 2007-01-06 16:28:38 stephena Exp $
*/
class FrameBuffer
{
@ -545,9 +545,6 @@ class FrameBuffer
const string& currentScalerName();
private:
// Indicates the current framerate of the system
uInt32 myFrameRate;
// Indicates the number of times the framebuffer was initialized
uInt32 myInitializedCount;

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: OSystem.cxx,v 1.91 2007-01-06 16:21:31 stephena Exp $
// $Id: OSystem.cxx,v 1.92 2007-01-06 16:28:38 stephena Exp $
//============================================================================
#include <cassert>
@ -324,7 +324,6 @@ void OSystem::createSound()
bool OSystem::createConsole(const string& romfile)
{
// Do a little error checking; it shouldn't be necessary
setFramerate(60); // make sure we can see messages
if(myConsole) deleteConsole();
bool retval = false, showmessage = false;