diff --git a/Changes.txt b/Changes.txt index 9cf775f07..db1f1c3da 100644 --- a/Changes.txt +++ b/Changes.txt @@ -12,6 +12,18 @@ Release History =========================================================================== +3.4 to 3.4.1: (June xx, 2011) + + * Re-enabled 'grabmouse' commandline argument and associated + functionality with the following changes: + - it doesn't have a hotkey anymore + - it is changed in the "Input Settings' UI, not in 'Video Settings' + - it only has meaning while in emulation mode + - it is enabled by default + +-Have fun! + + 3.3 to 3.4: (May. 29, 2011) * Many improvements to input handling, particularly with the mouse and @@ -54,8 +66,6 @@ * Updated built-in version of the PNG library to the latest version. --Have fun! - 3.2.2 to 3.3: (November 12, 2010) diff --git a/docs/graphics/eventmapping_devsports.png b/docs/graphics/eventmapping_devsports.png index 8df806245..714bf1688 100644 Binary files a/docs/graphics/eventmapping_devsports.png and b/docs/graphics/eventmapping_devsports.png differ diff --git a/docs/index.html b/docs/index.html index df39e9131..a57a4add2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -52,7 +52,7 @@


-
February 1999 - May 2011
+
February 1999 - June 2011
The Stella Team
Stella Homepage
@@ -1584,7 +1584,7 @@
-video <soft|gl>
- Use SDL software or OpenGL rendering mode. + Use software or OpenGL rendering mode. @@ -1792,6 +1792,11 @@ Enable using the mouse for various controllers (paddle, driving, etc). + +
-grabmouse <1|0>
+ Keeps the mouse in the game window in emulation mode. + +
-dsense <number>
Sensitivity for emulation of paddles when using a digital device @@ -2374,6 +2379,7 @@ Mouse paddle sensitivitySensitivity used when emulating a paddle using a mouse-msense Allow all 4 ...Allow all 4 joystick directions to be pressed simultaneously-joyallow4 Use mouse as ...Use the mouse for various controllers (paddles, driving, etc)-usemouse + Grab mouse ...Keep mouse in window in emulation mode-grabmouse @@ -2567,7 +2573,7 @@

Note that you must use the entire name of the port as specified by your operating system. For example, in Windows this would be COM1, COM2, etc; Linux and MacOSX tend to use names similar to '/dev/xxxxxx'. - For now, only Linux/UNIX, MacOSX, and Win32 are supported.

+ For now, only Linux/UNIX, MacOSX, and Windows are supported.

Support for the EEPROM portion of the AtariVox and SaveKey is currently emulated. That is, a file will be created on your computer simulating the diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index ac1e9f659..d021eb547 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -743,11 +743,12 @@ cerr << "New mode:" << endl // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void FrameBuffer::setCursorState() { - // Always grab mouse in fullscreen or during emulation, + // Always grab mouse in fullscreen or during emulation (if enabled), // and don't show the cursor during emulation bool emulation = myOSystem->eventHandler().state() == EventHandler::S_EMULATE; - grabMouse(fullScreen() || emulation); + grabMouse(fullScreen() || + (emulation && myOSystem->settings().getBool("grabmouse"))); showCursor(!emulation); } diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx index 85bf02444..b08ccc7f8 100644 --- a/src/emucore/OSystem.cxx +++ b/src/emucore/OSystem.cxx @@ -643,9 +643,16 @@ string OSystem::MD5FromFile(const string& filename) void OSystem::logMessage(const string& message, uInt8 level) { if(level == 0) - cerr << message; + { + cout << message << flush; + myLogMessages += message; + } else if(level <= (uInt8)mySettings->getInt("showinfo")) - cout << message; + { + if(1) // TODO - messages should be output to console + cout << message << flush; + myLogMessages += message; + } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/OSystem.hxx b/src/emucore/OSystem.hxx index 910916f27..73e8d3f2a 100644 --- a/src/emucore/OSystem.hxx +++ b/src/emucore/OSystem.hxx @@ -386,6 +386,13 @@ class OSystem */ void logMessage(const string& message, uInt8 level); + /** + Get the system messages logged up to this point. + + @return The list of log messages + */ + const string& logMessages() const { return myLogMessages; } + public: ////////////////////////////////////////////////////////////////////// // The following methods are system-specific and can be overrided in @@ -520,6 +527,9 @@ class OSystem // Pointer to the StateManager object StateManager* myStateManager; + // The list of log messages + string myLogMessages; + // Maximum dimensions of the desktop area uInt32 myDesktopWidth, myDesktopHeight; diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx index e7b844b87..a141baa00 100644 --- a/src/emucore/Settings.cxx +++ b/src/emucore/Settings.cxx @@ -54,6 +54,7 @@ Settings::Settings(OSystem* osystem) setInternal("fullscreen", "0"); setInternal("fullres", "auto"); setInternal("center", "false"); + setInternal("grabmouse", "true"); setInternal("palette", "standard"); setInternal("colorloss", "false"); setInternal("timing", "sleep"); @@ -370,6 +371,7 @@ void Settings::usage() << " -fullscreen <1|0|-1> Use fullscreen mode (1 or 0), or disable switching to fullscreen entirely\n" << " -fullres The resolution to use in fullscreen mode\n" << " -center <1|0> Centers game window (if possible)\n" + << " -grabmouse <1|0> Keeps the mouse in the game window\n" << " -palette \n" @@ -463,7 +465,7 @@ void Settings::usage() << " -pp Sets the 'Display.Phosphor' property\n" << " -ppblend Sets the 'Display.PPBlend' property\n" #endif - << endl; + << endl << flush; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/gui/InputDialog.cxx b/src/gui/InputDialog.cxx index d2fad3cd8..8ee341724 100644 --- a/src/gui/InputDialog.cxx +++ b/src/gui/InputDialog.cxx @@ -49,7 +49,7 @@ InputDialog::InputDialog(OSystem* osystem, DialogContainer* parent, // Set real dimensions _w = BSPF_min(50 * fontWidth + 10, max_w); - _h = BSPF_min(12 * (lineHeight + 4) + 10, max_h); + _h = BSPF_min(13 * (lineHeight + 4) + 10, max_h); // The tab widget xpos = 2; ypos = vBorder; @@ -190,6 +190,15 @@ void InputDialog::addDevicePortTab(const GUI::Font& font) "Use mouse as a controller"); wid.push_back(myMouseEnabled); + // Grab mouse (in windowed mode) + ypos += lineHeight + 4; + myGrabMouse = new CheckboxWidget(myTab, font, xpos, ypos, + "Grab mouse in emulation mode"); + wid.push_back(myGrabMouse); +#ifndef WINDOWED_SUPPORT + myGrabMouse->clearFlags(WIDGET_ENABLED); +#endif + // Add items for virtual device ports addToFocusList(wid, tabID); } @@ -210,8 +219,10 @@ void InputDialog::loadConfig() myDeadzoneLabel->setValue(Joystick::deadzone()); // Mouse/paddle enabled - bool usemouse = instance().settings().getBool("usemouse"); - myMouseEnabled->setState(usemouse); + myMouseEnabled->setState(instance().settings().getBool("usemouse")); + + // Grab mouse + myGrabMouse->setState(instance().settings().getBool("grabmouse")); // Paddle speed (digital and mouse) myDPaddleSpeed->setValue(instance().settings().getInt("dsense")); @@ -246,6 +257,10 @@ void InputDialog::saveConfig() instance().settings().setBool("usemouse", usemouse); instance().eventHandler().setMouseControllerMode(usemouse ? 0 : -1); + // Grab mouse + instance().settings().setBool("grabmouse", myGrabMouse->getState()); + instance().frameBuffer().setCursorState(); + // Paddle speed (digital and mouse) int sensitivity = myDPaddleSpeed->getValue(); instance().settings().setInt("dsense", sensitivity); @@ -289,6 +304,9 @@ void InputDialog::setDefaults() // Mouse/paddle enabled myMouseEnabled->setState(true); + // Grab mouse + myGrabMouse->setState(true); + // Paddle speed (digital and mouse) myDPaddleSpeed->setValue(5); myDPaddleLabel->setLabel("5"); diff --git a/src/gui/InputDialog.hxx b/src/gui/InputDialog.hxx index fd8058fa3..65280f5b0 100644 --- a/src/gui/InputDialog.hxx +++ b/src/gui/InputDialog.hxx @@ -81,6 +81,7 @@ class InputDialog : public Dialog StaticTextWidget* myMPaddleLabel; CheckboxWidget* myAllowAll4; CheckboxWidget* myMouseEnabled; + CheckboxWidget* myGrabMouse; }; #endif