mirror of https://github.com/stella-emu/stella.git
Turn off joymouse functionality by default. It still seems to cause
some problems in the OSX port. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@941 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
07f320e1f1
commit
beab75c5b0
|
@ -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: CheatManager.cxx,v 1.5 2005-12-18 18:37:01 stephena Exp $
|
||||
// $Id: CheatManager.cxx,v 1.6 2006-01-08 13:55:03 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <sstream>
|
||||
|
@ -265,6 +265,7 @@ void CheatManager::loadCheatDatabase()
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void CheatManager::saveCheatDatabase()
|
||||
{
|
||||
cerr << "CheatManager::saveCheatDatabase(): " << myCheatMap.size() << endl;
|
||||
string cheatfile = myOSystem->baseDir() + BSPF_PATH_SEPARATOR + "stella.cht";
|
||||
ofstream out(cheatfile.c_str(), ios::out);
|
||||
if(!out)
|
||||
|
@ -319,6 +320,8 @@ void CheatManager::saveCheats(const string& md5sum)
|
|||
// Add new entry only if there are any cheats defined
|
||||
if(cheats.str() != "")
|
||||
myCheatMap.insert(make_pair(md5sum, cheats.str()));
|
||||
|
||||
cerr << "added " << myCheatList.size() << " cheats, map is " << myCheatMap.size() << endl;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -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: mainSDL.cxx,v 1.60 2006-01-08 02:28:02 stephena Exp $
|
||||
// $Id: mainSDL.cxx,v 1.61 2006-01-08 13:55:03 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <sstream>
|
||||
|
@ -163,6 +163,10 @@ int main(int argc, char* argv[])
|
|||
// We do it once here, so the rest of the program can assume valid settings
|
||||
theOSystem->settings().validate();
|
||||
|
||||
// Create the full OSystem after the settings, since settings are
|
||||
// probably needed for defaults
|
||||
theOSystem->create();
|
||||
|
||||
// Create the event handler for the system
|
||||
EventHandler handler(theOSystem);
|
||||
|
||||
|
|
|
@ -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.53 2006-01-08 02:28:03 stephena Exp $
|
||||
// $Id: OSystem.cxx,v 1.54 2006-01-08 13:55:03 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <cassert>
|
||||
|
@ -62,6 +62,39 @@ OSystem::OSystem()
|
|||
myFeatures(""),
|
||||
myFont(NULL),
|
||||
myConsoleFont(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
OSystem::~OSystem()
|
||||
{
|
||||
delete myMenu;
|
||||
delete myCommandMenu;
|
||||
delete myLauncher;
|
||||
delete myFont;
|
||||
delete myConsoleFont;
|
||||
|
||||
// Remove any game console that is currently attached
|
||||
delete myConsole;
|
||||
|
||||
// OSystem takes responsibility for framebuffer and sound,
|
||||
// since it created them
|
||||
delete myFrameBuffer;
|
||||
delete mySound;
|
||||
|
||||
// These must be deleted after all the others
|
||||
// This is a bit hacky, since it depends on ordering
|
||||
// of d'tor calls
|
||||
#ifdef DEVELOPER_SUPPORT
|
||||
delete myDebugger;
|
||||
#endif
|
||||
#ifdef CHEATCODE_SUPPORT
|
||||
delete myCheatManager;
|
||||
#endif
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool OSystem::create()
|
||||
{
|
||||
// Create menu and launcher GUI objects
|
||||
myMenu = new Menu(this);
|
||||
|
@ -99,34 +132,6 @@ OSystem::OSystem()
|
|||
#endif
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
OSystem::~OSystem()
|
||||
{
|
||||
delete myMenu;
|
||||
delete myCommandMenu;
|
||||
delete myLauncher;
|
||||
delete myFont;
|
||||
delete myConsoleFont;
|
||||
|
||||
// Remove any game console that is currently attached
|
||||
delete myConsole;
|
||||
|
||||
// OSystem takes responsibility for framebuffer and sound,
|
||||
// since it created them
|
||||
delete myFrameBuffer;
|
||||
delete mySound;
|
||||
|
||||
// These must be deleted after all the others
|
||||
// This is a bit hacky, since it depends on ordering
|
||||
// of d'tor calls
|
||||
#ifdef DEVELOPER_SUPPORT
|
||||
delete myDebugger;
|
||||
#endif
|
||||
#ifdef CHEATCODE_SUPPORT
|
||||
delete myCheatManager;
|
||||
#endif
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void OSystem::setBaseDir(const string& basedir)
|
||||
{
|
||||
|
|
|
@ -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.34 2006-01-08 02:28:03 stephena Exp $
|
||||
// $Id: OSystem.hxx,v 1.35 2006-01-08 13:55:03 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef OSYSTEM_HXX
|
||||
|
@ -44,7 +44,7 @@ class CheatManager;
|
|||
other objects belong.
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: OSystem.hxx,v 1.34 2006-01-08 02:28:03 stephena Exp $
|
||||
@version $Id: OSystem.hxx,v 1.35 2006-01-08 13:55:03 stephena Exp $
|
||||
*/
|
||||
class OSystem
|
||||
{
|
||||
|
@ -59,6 +59,11 @@ class OSystem
|
|||
*/
|
||||
virtual ~OSystem();
|
||||
|
||||
/**
|
||||
Create all child objects which belong to this OSystem
|
||||
*/
|
||||
virtual bool create();
|
||||
|
||||
public:
|
||||
/**
|
||||
Adds the specified eventhandler to the system.
|
||||
|
|
|
@ -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: Settings.cxx,v 1.71 2006-01-08 02:28:03 stephena Exp $
|
||||
// $Id: Settings.cxx,v 1.72 2006-01-08 13:55:03 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <cassert>
|
||||
|
@ -65,7 +65,7 @@ Settings::Settings(OSystem* osystem)
|
|||
set("paddle", "0");
|
||||
set("sa1", "left");
|
||||
set("sa2", "right");
|
||||
set("mspeed", "50");
|
||||
set("joymouse", "false");
|
||||
set("p1speed", "50");
|
||||
set("p2speed", "50");
|
||||
set("p3speed", "50");
|
||||
|
@ -299,10 +299,15 @@ void Settings::usage()
|
|||
<< " -clipvol <1|0> Enable volume clipping (eliminates popping)\n"
|
||||
<< endl
|
||||
#endif
|
||||
<< " -paddle <0|1|2|3> Indicates which paddle the mouse should emulate\n"
|
||||
<< " -showinfo <1|0> Shows some game info\n"
|
||||
<< " -paddle <0|1|2|3> Indicates which paddle the mouse should emulate\n"
|
||||
<< " -sa1 <left|right> Stelladaptor 1 emulates specified joystick port\n"
|
||||
<< " -sa2 <left|right> Stelladaptor 2 emulates specified joystick port\n"
|
||||
<< " -joymouse <1|0> Enable mouse emulation using joystick in GUI\n"
|
||||
<< " -p1speed <number> Speed of emulated mouse movement for paddle 1 (0-100)\n"
|
||||
<< " -p2speed <number> Speed of emulated mouse movement for paddle 2 (0-100)\n"
|
||||
<< " -p3speed <number> Speed of emulated mouse movement for paddle 3 (0-100)\n"
|
||||
<< " -p4speed <number> Speed of emulated mouse movement for paddle 4 (0-100)\n"
|
||||
#ifdef UNIX
|
||||
<< " -accurate <1|0> Accurate game timing (uses more CPU)\n"
|
||||
#endif
|
||||
|
|
|
@ -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: SettingsGP2X.cxx,v 1.1 2006-01-08 02:28:03 stephena Exp $
|
||||
// $Id: SettingsGP2X.cxx,v 1.2 2006-01-08 13:55:03 stephena Exp $
|
||||
// Modified on 2006/01/04 by Alex Zaballa for use on GP2X
|
||||
//============================================================================
|
||||
|
||||
|
@ -35,6 +35,7 @@ SettingsGP2X::SettingsGP2X(OSystem* osystem)
|
|||
set("fragsize", "512");
|
||||
set("tiafreq", "22050");
|
||||
set("clipvol", "false");
|
||||
set("joymouse", "true");
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -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: DialogContainer.cxx,v 1.26 2006-01-08 02:28:03 stephena Exp $
|
||||
// $Id: DialogContainer.cxx,v 1.27 2006-01-08 13:55:03 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include "OSystem.hxx"
|
||||
|
@ -35,6 +35,7 @@ DialogContainer::DialogContainer(OSystem* osystem)
|
|||
memset(&ourJoyMouse, 0, sizeof(JoyMouse));
|
||||
ourJoyMouse.delay_time = 25;
|
||||
|
||||
ourEnableJoyMouseFlag = myOSystem->settings().getBool("joymouse");
|
||||
reset();
|
||||
}
|
||||
|
||||
|
@ -98,7 +99,8 @@ void DialogContainer::updateTime(uInt32 time)
|
|||
}
|
||||
|
||||
// Update joy to mouse events
|
||||
handleJoyMouse(time);
|
||||
if(ourEnableJoyMouseFlag)
|
||||
handleJoyMouse(time);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -497,5 +499,8 @@ void DialogContainer::reset()
|
|||
myOSystem->eventHandler().createMouseMotionEvent(ourJoyMouse.x, ourJoyMouse.y);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool DialogContainer::ourEnableJoyMouseFlag;
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
JoyMouse DialogContainer::ourJoyMouse;
|
||||
|
|
|
@ -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: DialogContainer.hxx,v 1.13 2006-01-04 01:24:17 stephena Exp $
|
||||
// $Id: DialogContainer.hxx,v 1.14 2006-01-08 13:55:03 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef DIALOG_CONTAINER_HXX
|
||||
|
@ -37,7 +37,7 @@ typedef FixedStack<Dialog *> DialogStack;
|
|||
a stack, and handles their events.
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: DialogContainer.hxx,v 1.13 2006-01-04 01:24:17 stephena Exp $
|
||||
@version $Id: DialogContainer.hxx,v 1.14 2006-01-08 13:55:03 stephena Exp $
|
||||
*/
|
||||
class DialogContainer
|
||||
{
|
||||
|
@ -141,6 +141,9 @@ class DialogContainer
|
|||
*/
|
||||
virtual void initialize() = 0;
|
||||
|
||||
// Whether to enable joymouse emulation
|
||||
static bool ourEnableJoyMouseFlag;
|
||||
|
||||
// Emulation of mouse using joystick axis events
|
||||
static JoyMouse ourJoyMouse;
|
||||
|
||||
|
|
|
@ -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: SettingsPSP.cxx,v 1.3 2005-11-15 22:24:32 optixx Exp $
|
||||
// $Id: SettingsPSP.cxx,v 1.4 2006-01-08 13:55:03 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include "bspf.hxx"
|
||||
|
@ -22,15 +22,15 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SettingsPSP::SettingsPSP(OSystem* osystem)
|
||||
: Settings(osystem)
|
||||
: Settings(osystem)
|
||||
{
|
||||
set("accurate", "false");
|
||||
set("zoom", "1");
|
||||
set("romdir", "ms0:/stella/roms/");
|
||||
set("ssdir", "ms0:/stella/snapshots/");
|
||||
set("sound", "true");
|
||||
set("pspoverclock", "false");
|
||||
set("joymouse","true");
|
||||
set("accurate", "false");
|
||||
set("zoom", "1");
|
||||
set("romdir", "ms0:/stella/roms/");
|
||||
set("ssdir", "ms0:/stella/snapshots/");
|
||||
set("sound", "true");
|
||||
set("pspoverclock", "false");
|
||||
set("joymouse", "true");
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -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: SettingsUNIX.cxx,v 1.14 2005-06-16 01:11:29 stephena Exp $
|
||||
// $Id: SettingsUNIX.cxx,v 1.15 2006-01-08 13:55:03 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include "bspf.hxx"
|
||||
|
@ -22,7 +22,7 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SettingsUNIX::SettingsUNIX(OSystem* osystem)
|
||||
: Settings(osystem)
|
||||
: Settings(osystem)
|
||||
{
|
||||
// This argument is only valid for Linux/UNIX, and will eventually be removed
|
||||
set("accurate", "false");
|
||||
|
|
Loading…
Reference in New Issue