diff --git a/stella/src/emucore/Settings.cxx b/stella/src/emucore/Settings.cxx index 6bd8b01e9..3ad00d8d8 100644 --- a/stella/src/emucore/Settings.cxx +++ b/stella/src/emucore/Settings.cxx @@ -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.68 2005-12-16 14:41:14 stephena Exp $ +// $Id: Settings.cxx,v 1.69 2005-12-24 22:50:52 stephena Exp $ //============================================================================ #include @@ -60,7 +60,6 @@ Settings::Settings(OSystem* osystem) set("joymap", ""); set("joyaxismap", ""); set("paddle", "0"); - set("joymouse", "false"); set("sa1", "left"); set("sa2", "right"); set("mspeed", "50"); @@ -289,7 +288,6 @@ void Settings::usage() << endl #endif << " -paddle <0|1|2|3> Indicates which paddle the mouse should emulate\n" - << " -joymouse <1|0> Enable joystick emulates mouse in GUI\n" << " -showinfo <1|0> Shows some game info\n" << " -sa1 Stelladaptor 1 emulates specified joystick port\n" << " -sa2 Stelladaptor 2 emulates specified joystick port\n" diff --git a/stella/src/gui/CommandMenu.cxx b/stella/src/gui/CommandMenu.cxx index 6766be633..ee0129c15 100644 --- a/stella/src/gui/CommandMenu.cxx +++ b/stella/src/gui/CommandMenu.cxx @@ -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: CommandMenu.cxx,v 1.2 2005-12-24 22:09:36 stephena Exp $ +// $Id: CommandMenu.cxx,v 1.3 2005-12-24 22:50:52 stephena Exp $ //============================================================================ #include "Dialog.hxx" @@ -22,11 +22,8 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CommandMenu::CommandMenu(OSystem* osystem) - : DialogContainer(osystem) + : DialogContainer(osystem) { - // Tell the DialogContainer that we don't want to emulate mouse motion - // with the joystick axis, since we want to directly receive axis events - myEmulateMouseFlag = false; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stella/src/gui/Dialog.cxx b/stella/src/gui/Dialog.cxx index 7a7b8b178..a09ea0abf 100644 --- a/stella/src/gui/Dialog.cxx +++ b/stella/src/gui/Dialog.cxx @@ -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: Dialog.cxx,v 1.38 2005-12-24 22:09:36 stephena Exp $ +// $Id: Dialog.cxx,v 1.39 2005-12-24 22:50:52 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -280,10 +280,8 @@ void Dialog::handleMouseWheel(int x, int y, int direction) if(!w) w = _focusedWidget; if (w) -{cerr << w << endl; w->handleMouseWheel(x, y, direction); } -} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void Dialog::handleKeyDown(int ascii, int keycode, int modifiers) diff --git a/stella/src/gui/DialogContainer.cxx b/stella/src/gui/DialogContainer.cxx index 3a29012ca..d9892db46 100644 --- a/stella/src/gui/DialogContainer.cxx +++ b/stella/src/gui/DialogContainer.cxx @@ -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.21 2005-12-24 22:09:36 stephena Exp $ +// $Id: DialogContainer.cxx,v 1.22 2005-12-24 22:50:53 stephena Exp $ //============================================================================ #include "OSystem.hxx" @@ -30,8 +30,7 @@ DialogContainer::DialogContainer(OSystem* osystem) : myOSystem(osystem), myBaseDialog(NULL), myTime(0), - myRefreshFlag(false), - myEmulateMouseFlag(true) + myRefreshFlag(false) { memset(&ourJoyMouse, 0, sizeof(JoyMouse)); ourJoyMouse.delay_time = 25; @@ -268,7 +267,12 @@ void DialogContainer::handleJoyAxisEvent(int stick, int axis, int value) if(myDialogStack.empty()) return; - if(myEmulateMouseFlag) + // Send the event to the dialog box on the top of the stack + Dialog* activeDialog = myDialogStack.top(); + + if(activeDialog->wantsEvents()) + activeDialog->handleJoyAxis(stick, axis, value); + else { if(value > JOY_DEADZONE) value -= JOY_DEADZONE; @@ -306,12 +310,6 @@ void DialogContainer::handleJoyAxisEvent(int stick, int axis, int value) } } } - else - { - // Send the event to the dialog box on the top of the stack - Dialog* activeDialog = myDialogStack.top(); - activeDialog->handleJoyAxis(stick, axis, value); - } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stella/src/gui/DialogContainer.hxx b/stella/src/gui/DialogContainer.hxx index a3250fff6..d6bd7a90b 100644 --- a/stella/src/gui/DialogContainer.hxx +++ b/stella/src/gui/DialogContainer.hxx @@ -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.11 2005-12-24 22:09:36 stephena Exp $ +// $Id: DialogContainer.hxx,v 1.12 2005-12-24 22:50:53 stephena Exp $ //============================================================================ #ifndef DIALOG_CONTAINER_HXX @@ -37,7 +37,7 @@ typedef FixedStack DialogStack; a stack, and handles their events. @author Stephen Anthony - @version $Id: DialogContainer.hxx,v 1.11 2005-12-24 22:09:36 stephena Exp $ + @version $Id: DialogContainer.hxx,v 1.12 2005-12-24 22:50:53 stephena Exp $ */ class DialogContainer { @@ -167,9 +167,6 @@ class DialogContainer // Indicates a full refresh of all dialogs is required bool myRefreshFlag; - // Indicates if we should emulate mouse motion events for this container - bool myEmulateMouseFlag; - // For continuous events (keyDown) struct { int ascii; diff --git a/stella/src/gui/EventMappingWidget.cxx b/stella/src/gui/EventMappingWidget.cxx index 5adbabfce..058a839e9 100644 --- a/stella/src/gui/EventMappingWidget.cxx +++ b/stella/src/gui/EventMappingWidget.cxx @@ -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: EventMappingWidget.cxx,v 1.6 2005-12-24 22:09:36 stephena Exp $ +// $Id: EventMappingWidget.cxx,v 1.7 2005-12-24 22:50:53 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -235,6 +235,7 @@ void EventMappingWidget::handleCommand(CommandSender* sender, int cmd, } break; +/* case kListItemDoubleClickedCmd: if(myActionsList->getSelected() >= 0) { @@ -242,6 +243,7 @@ void EventMappingWidget::handleCommand(CommandSender* sender, int cmd, startRemapping(); } break; +*/ case kStartMapCmd: startRemapping();