mirror of https://github.com/stella-emu/stella.git
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:
parent
127adbb5c6
commit
49955806d8
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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>
|
#include <algorithm>
|
||||||
|
@ -95,7 +95,7 @@ EventHandler::EventHandler(OSystem* osystem)
|
||||||
myJoyTable[i] = Event::NoType;
|
myJoyTable[i] = Event::NoType;
|
||||||
|
|
||||||
// Erase the Message array
|
// Erase the Message array
|
||||||
for(Int32 i = 0; i < Event::LastType; ++i)
|
for(i = 0; i < Event::LastType; ++i)
|
||||||
ourMessageTable[i] = "";
|
ourMessageTable[i] = "";
|
||||||
|
|
||||||
// Set unchanging messages
|
// Set unchanging messages
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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>
|
#include <cassert>
|
||||||
|
@ -123,8 +123,6 @@ OSystem::OSystem()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
OSystem::~OSystem()
|
OSystem::~OSystem()
|
||||||
{
|
{
|
||||||
myDriverList.clear();
|
|
||||||
|
|
||||||
delete myMenu;
|
delete myMenu;
|
||||||
delete myCommandMenu;
|
delete myCommandMenu;
|
||||||
delete myLauncher;
|
delete myLauncher;
|
||||||
|
@ -187,6 +185,13 @@ void OSystem::setConfigFiles(const string& userconfig,
|
||||||
myConfigInputFile = "";
|
myConfigInputFile = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void OSystem::setFramerate(uInt32 framerate)
|
||||||
|
{
|
||||||
|
myDisplayFrameRate = framerate;
|
||||||
|
myTimePerFrame = (uInt32)(1000000.0 / (double)myDisplayFrameRate);
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool OSystem::createFrameBuffer(bool showmessage)
|
bool OSystem::createFrameBuffer(bool showmessage)
|
||||||
{
|
{
|
||||||
|
@ -199,18 +204,15 @@ bool OSystem::createFrameBuffer(bool showmessage)
|
||||||
if(video == "soft")
|
if(video == "soft")
|
||||||
#if defined (PSP)
|
#if defined (PSP)
|
||||||
myFrameBuffer = new FrameBufferPSP(this);
|
myFrameBuffer = new FrameBufferPSP(this);
|
||||||
#elif defined (WIN32_WCE)
|
#elif defined (_WIN32_WCE)
|
||||||
myFrameBuffer = new FrameBufferWinCE(this);
|
myFrameBuffer = new FrameBufferWinCE(this);
|
||||||
#else
|
#else
|
||||||
myFrameBuffer = new FrameBufferSoft(this);
|
myFrameBuffer = new FrameBufferSoft(this);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DISPLAY_OPENGL
|
#ifdef DISPLAY_OPENGL
|
||||||
else if(video == "gl")
|
else if(video == "gl")
|
||||||
myFrameBuffer = new FrameBufferGL(this);
|
myFrameBuffer = new FrameBufferGL(this);
|
||||||
#endif
|
#endif
|
||||||
else // a driver that doesn't exist was requested, so use software mode
|
|
||||||
myFrameBuffer = new FrameBufferSoft(this);
|
|
||||||
|
|
||||||
if(!myFrameBuffer)
|
if(!myFrameBuffer)
|
||||||
return false;
|
return false;
|
||||||
|
@ -277,7 +279,7 @@ void OSystem::createSound()
|
||||||
|
|
||||||
// And recreate a new sound device
|
// And recreate a new sound device
|
||||||
#ifdef SOUND_SUPPORT
|
#ifdef SOUND_SUPPORT
|
||||||
#if defined (WIN32_WCE)
|
#if defined (_WIN32_WCE)
|
||||||
mySound = new SoundWinCE(this);
|
mySound = new SoundWinCE(this);
|
||||||
#else
|
#else
|
||||||
mySound = new SoundSDL(this);
|
mySound = new SoundSDL(this);
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef OSYSTEM_HXX
|
||||||
|
@ -44,7 +44,7 @@ class CheatManager;
|
||||||
other objects belong.
|
other objects belong.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@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
|
class OSystem
|
||||||
{
|
{
|
||||||
|
@ -182,9 +182,7 @@ class OSystem
|
||||||
|
|
||||||
@param framerate The video framerate to use
|
@param framerate The video framerate to use
|
||||||
*/
|
*/
|
||||||
void setFramerate(uInt32 framerate)
|
virtual void setFramerate(uInt32 framerate);
|
||||||
{ myDisplayFrameRate = framerate;
|
|
||||||
myTimePerFrame = (uInt32)(1000000.0 / (double)myDisplayFrameRate); }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get the current framerate for the video system.
|
Get the current framerate for the video system.
|
||||||
|
@ -282,13 +280,6 @@ class OSystem
|
||||||
*/
|
*/
|
||||||
const string& features() { return myFeatures; }
|
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.
|
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
|
// Time per frame for a video update, based on the current framerate
|
||||||
uInt32 myTimePerFrame;
|
uInt32 myTimePerFrame;
|
||||||
|
|
||||||
// Holds the types of SDL video driver supported by this OSystem
|
|
||||||
StringList myDriverList;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
string myBaseDir;
|
string myBaseDir;
|
||||||
string myStateDir;
|
string myStateDir;
|
||||||
|
|
Loading…
Reference in New Issue