Some minor fixes for the WinCE port.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@893 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2005-11-21 13:47:34 +00:00
parent 127adbb5c6
commit 49955806d8
3 changed files with 15 additions and 25 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: EventHandler.cxx,v 1.117 2005-11-21 00:20:22 stephena Exp $
// $Id: EventHandler.cxx,v 1.118 2005-11-21 13:47:34 stephena Exp $
//============================================================================
#include <algorithm>
@ -95,7 +95,7 @@ EventHandler::EventHandler(OSystem* osystem)
myJoyTable[i] = Event::NoType;
// Erase the Message array
for(Int32 i = 0; i < Event::LastType; ++i)
for(i = 0; i < Event::LastType; ++i)
ourMessageTable[i] = "";
// Set unchanging messages

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.45 2005-11-12 22:04:57 stephena Exp $
// $Id: OSystem.cxx,v 1.46 2005-11-21 13:47:34 stephena Exp $
//============================================================================
#include <cassert>
@ -123,8 +123,6 @@ OSystem::OSystem()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OSystem::~OSystem()
{
myDriverList.clear();
delete myMenu;
delete myCommandMenu;
delete myLauncher;
@ -187,6 +185,13 @@ void OSystem::setConfigFiles(const string& userconfig,
myConfigInputFile = "";
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void OSystem::setFramerate(uInt32 framerate)
{
myDisplayFrameRate = framerate;
myTimePerFrame = (uInt32)(1000000.0 / (double)myDisplayFrameRate);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool OSystem::createFrameBuffer(bool showmessage)
{
@ -199,18 +204,15 @@ bool OSystem::createFrameBuffer(bool showmessage)
if(video == "soft")
#if defined (PSP)
myFrameBuffer = new FrameBufferPSP(this);
#elif defined (WIN32_WCE)
#elif defined (_WIN32_WCE)
myFrameBuffer = new FrameBufferWinCE(this);
#else
myFrameBuffer = new FrameBufferSoft(this);
#endif
#ifdef DISPLAY_OPENGL
else if(video == "gl")
myFrameBuffer = new FrameBufferGL(this);
#endif
else // a driver that doesn't exist was requested, so use software mode
myFrameBuffer = new FrameBufferSoft(this);
if(!myFrameBuffer)
return false;
@ -277,7 +279,7 @@ void OSystem::createSound()
// And recreate a new sound device
#ifdef SOUND_SUPPORT
#if defined (WIN32_WCE)
#if defined (_WIN32_WCE)
mySound = new SoundWinCE(this);
#else
mySound = new SoundSDL(this);

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.hxx,v 1.31 2005-11-11 21:44:19 stephena Exp $
// $Id: OSystem.hxx,v 1.32 2005-11-21 13:47:34 stephena Exp $
//============================================================================
#ifndef OSYSTEM_HXX
@ -44,7 +44,7 @@ class CheatManager;
other objects belong.
@author Stephen Anthony
@version $Id: OSystem.hxx,v 1.31 2005-11-11 21:44:19 stephena Exp $
@version $Id: OSystem.hxx,v 1.32 2005-11-21 13:47:34 stephena Exp $
*/
class OSystem
{
@ -182,9 +182,7 @@ class OSystem
@param framerate The video framerate to use
*/
void setFramerate(uInt32 framerate)
{ myDisplayFrameRate = framerate;
myTimePerFrame = (uInt32)(1000000.0 / (double)myDisplayFrameRate); }
virtual void setFramerate(uInt32 framerate);
/**
Get the current framerate for the video system.
@ -282,13 +280,6 @@ class OSystem
*/
const string& features() { return myFeatures; }
/**
The features which are conditionally compiled into Stella.
@return The supported features
*/
const StringList& driverList() { return myDriverList; }
/**
Open the given ROM and return an array containing its contents.
@ -388,9 +379,6 @@ class OSystem
// Time per frame for a video update, based on the current framerate
uInt32 myTimePerFrame;
// Holds the types of SDL video driver supported by this OSystem
StringList myDriverList;
private:
string myBaseDir;
string myStateDir;