mirror of https://github.com/stella-emu/stella.git
Re-enabled 'grabmouse' functionality with a few changes:
- it doesn't have a hotkey any more - 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 git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2245 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
d5ce0042e4
commit
2b9f625f76
14
Changes.txt
14
Changes.txt
|
@ -12,6 +12,18 @@
|
||||||
Release History
|
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)
|
3.3 to 3.4: (May. 29, 2011)
|
||||||
|
|
||||||
* Many improvements to input handling, particularly with the mouse and
|
* 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.
|
* Updated built-in version of the PNG library to the latest version.
|
||||||
|
|
||||||
-Have fun!
|
|
||||||
|
|
||||||
|
|
||||||
3.2.2 to 3.3: (November 12, 2010)
|
3.2.2 to 3.3: (November 12, 2010)
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 7.9 KiB |
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
<br><br><br>
|
<br><br><br>
|
||||||
|
|
||||||
<center><b>February 1999 - May 2011</b></center>
|
<center><b>February 1999 - June 2011</b></center>
|
||||||
<center><b>The Stella Team</b></center>
|
<center><b>The Stella Team</b></center>
|
||||||
<center><b><a href="http://stella.sourceforge.net">Stella Homepage</a></b></center>
|
<center><b><a href="http://stella.sourceforge.net">Stella Homepage</a></b></center>
|
||||||
|
|
||||||
|
@ -1584,7 +1584,7 @@
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre>-video <soft|gl></pre></td>
|
<td><pre>-video <soft|gl></pre></td>
|
||||||
<td>Use SDL software or OpenGL rendering mode.</td>
|
<td>Use software or OpenGL rendering mode.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -1792,6 +1792,11 @@
|
||||||
<td>Enable using the mouse for various controllers (paddle, driving, etc).</td>
|
<td>Enable using the mouse for various controllers (paddle, driving, etc).</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><pre>-grabmouse <1|0></pre></td>
|
||||||
|
<td>Keeps the mouse in the game window in emulation mode.</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre>-dsense <number></pre></td>
|
<td><pre>-dsense <number></pre></td>
|
||||||
<td>Sensitivity for emulation of paddles when using a digital device
|
<td>Sensitivity for emulation of paddles when using a digital device
|
||||||
|
@ -2374,6 +2379,7 @@
|
||||||
<tr><td>Mouse paddle sensitivity</td><td>Sensitivity used when emulating a paddle using a mouse</td><td>-msense</td></tr>
|
<tr><td>Mouse paddle sensitivity</td><td>Sensitivity used when emulating a paddle using a mouse</td><td>-msense</td></tr>
|
||||||
<tr><td>Allow all 4 ...</td><td>Allow all 4 joystick directions to be pressed simultaneously</td><td>-joyallow4</td></tr>
|
<tr><td>Allow all 4 ...</td><td>Allow all 4 joystick directions to be pressed simultaneously</td><td>-joyallow4</td></tr>
|
||||||
<tr><td>Use mouse as ...</td><td>Use the mouse for various controllers (paddles, driving, etc)</td><td>-usemouse</td></tr>
|
<tr><td>Use mouse as ...</td><td>Use the mouse for various controllers (paddles, driving, etc)</td><td>-usemouse</td></tr>
|
||||||
|
<tr><td>Grab mouse ...</td><td>Keep mouse in window in emulation mode</td><td>-grabmouse</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -2567,7 +2573,7 @@
|
||||||
<p>Note that you must use the entire name of the port as specified by
|
<p>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,
|
your operating system. For example, in Windows this would be COM1,
|
||||||
COM2, etc; Linux and MacOSX tend to use names similar to '/dev/xxxxxx'.
|
COM2, etc; Linux and MacOSX tend to use names similar to '/dev/xxxxxx'.
|
||||||
For now, only Linux/UNIX, MacOSX, and Win32 are supported.</p>
|
For now, only Linux/UNIX, MacOSX, and Windows are supported.</p>
|
||||||
|
|
||||||
<p>Support for the EEPROM portion of the AtariVox and SaveKey is currently
|
<p>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
|
emulated. That is, a file will be created on your computer simulating the
|
||||||
|
|
|
@ -743,11 +743,12 @@ cerr << "New mode:" << endl
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void FrameBuffer::setCursorState()
|
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
|
// and don't show the cursor during emulation
|
||||||
bool emulation =
|
bool emulation =
|
||||||
myOSystem->eventHandler().state() == EventHandler::S_EMULATE;
|
myOSystem->eventHandler().state() == EventHandler::S_EMULATE;
|
||||||
grabMouse(fullScreen() || emulation);
|
grabMouse(fullScreen() ||
|
||||||
|
(emulation && myOSystem->settings().getBool("grabmouse")));
|
||||||
showCursor(!emulation);
|
showCursor(!emulation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -643,9 +643,16 @@ string OSystem::MD5FromFile(const string& filename)
|
||||||
void OSystem::logMessage(const string& message, uInt8 level)
|
void OSystem::logMessage(const string& message, uInt8 level)
|
||||||
{
|
{
|
||||||
if(level == 0)
|
if(level == 0)
|
||||||
cerr << message;
|
{
|
||||||
|
cout << message << flush;
|
||||||
|
myLogMessages += message;
|
||||||
|
}
|
||||||
else if(level <= (uInt8)mySettings->getInt("showinfo"))
|
else if(level <= (uInt8)mySettings->getInt("showinfo"))
|
||||||
cout << message;
|
{
|
||||||
|
if(1) // TODO - messages should be output to console
|
||||||
|
cout << message << flush;
|
||||||
|
myLogMessages += message;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -386,6 +386,13 @@ class OSystem
|
||||||
*/
|
*/
|
||||||
void logMessage(const string& message, uInt8 level);
|
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:
|
public:
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// The following methods are system-specific and can be overrided in
|
// The following methods are system-specific and can be overrided in
|
||||||
|
@ -520,6 +527,9 @@ class OSystem
|
||||||
// Pointer to the StateManager object
|
// Pointer to the StateManager object
|
||||||
StateManager* myStateManager;
|
StateManager* myStateManager;
|
||||||
|
|
||||||
|
// The list of log messages
|
||||||
|
string myLogMessages;
|
||||||
|
|
||||||
// Maximum dimensions of the desktop area
|
// Maximum dimensions of the desktop area
|
||||||
uInt32 myDesktopWidth, myDesktopHeight;
|
uInt32 myDesktopWidth, myDesktopHeight;
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ Settings::Settings(OSystem* osystem)
|
||||||
setInternal("fullscreen", "0");
|
setInternal("fullscreen", "0");
|
||||||
setInternal("fullres", "auto");
|
setInternal("fullres", "auto");
|
||||||
setInternal("center", "false");
|
setInternal("center", "false");
|
||||||
|
setInternal("grabmouse", "true");
|
||||||
setInternal("palette", "standard");
|
setInternal("palette", "standard");
|
||||||
setInternal("colorloss", "false");
|
setInternal("colorloss", "false");
|
||||||
setInternal("timing", "sleep");
|
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"
|
<< " -fullscreen <1|0|-1> Use fullscreen mode (1 or 0), or disable switching to fullscreen entirely\n"
|
||||||
<< " -fullres <auto|WxH> The resolution to use in fullscreen mode\n"
|
<< " -fullres <auto|WxH> The resolution to use in fullscreen mode\n"
|
||||||
<< " -center <1|0> Centers game window (if possible)\n"
|
<< " -center <1|0> Centers game window (if possible)\n"
|
||||||
|
<< " -grabmouse <1|0> Keeps the mouse in the game window\n"
|
||||||
<< " -palette <standard| Use the specified color palette\n"
|
<< " -palette <standard| Use the specified color palette\n"
|
||||||
<< " z26|\n"
|
<< " z26|\n"
|
||||||
<< " user>\n"
|
<< " user>\n"
|
||||||
|
@ -463,7 +465,7 @@ void Settings::usage()
|
||||||
<< " -pp <arg> Sets the 'Display.Phosphor' property\n"
|
<< " -pp <arg> Sets the 'Display.Phosphor' property\n"
|
||||||
<< " -ppblend <arg> Sets the 'Display.PPBlend' property\n"
|
<< " -ppblend <arg> Sets the 'Display.PPBlend' property\n"
|
||||||
#endif
|
#endif
|
||||||
<< endl;
|
<< endl << flush;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -49,7 +49,7 @@ InputDialog::InputDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
|
|
||||||
// Set real dimensions
|
// Set real dimensions
|
||||||
_w = BSPF_min(50 * fontWidth + 10, max_w);
|
_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
|
// The tab widget
|
||||||
xpos = 2; ypos = vBorder;
|
xpos = 2; ypos = vBorder;
|
||||||
|
@ -190,6 +190,15 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
|
||||||
"Use mouse as a controller");
|
"Use mouse as a controller");
|
||||||
wid.push_back(myMouseEnabled);
|
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
|
// Add items for virtual device ports
|
||||||
addToFocusList(wid, tabID);
|
addToFocusList(wid, tabID);
|
||||||
}
|
}
|
||||||
|
@ -210,8 +219,10 @@ void InputDialog::loadConfig()
|
||||||
myDeadzoneLabel->setValue(Joystick::deadzone());
|
myDeadzoneLabel->setValue(Joystick::deadzone());
|
||||||
|
|
||||||
// Mouse/paddle enabled
|
// Mouse/paddle enabled
|
||||||
bool usemouse = instance().settings().getBool("usemouse");
|
myMouseEnabled->setState(instance().settings().getBool("usemouse"));
|
||||||
myMouseEnabled->setState(usemouse);
|
|
||||||
|
// Grab mouse
|
||||||
|
myGrabMouse->setState(instance().settings().getBool("grabmouse"));
|
||||||
|
|
||||||
// Paddle speed (digital and mouse)
|
// Paddle speed (digital and mouse)
|
||||||
myDPaddleSpeed->setValue(instance().settings().getInt("dsense"));
|
myDPaddleSpeed->setValue(instance().settings().getInt("dsense"));
|
||||||
|
@ -246,6 +257,10 @@ void InputDialog::saveConfig()
|
||||||
instance().settings().setBool("usemouse", usemouse);
|
instance().settings().setBool("usemouse", usemouse);
|
||||||
instance().eventHandler().setMouseControllerMode(usemouse ? 0 : -1);
|
instance().eventHandler().setMouseControllerMode(usemouse ? 0 : -1);
|
||||||
|
|
||||||
|
// Grab mouse
|
||||||
|
instance().settings().setBool("grabmouse", myGrabMouse->getState());
|
||||||
|
instance().frameBuffer().setCursorState();
|
||||||
|
|
||||||
// Paddle speed (digital and mouse)
|
// Paddle speed (digital and mouse)
|
||||||
int sensitivity = myDPaddleSpeed->getValue();
|
int sensitivity = myDPaddleSpeed->getValue();
|
||||||
instance().settings().setInt("dsense", sensitivity);
|
instance().settings().setInt("dsense", sensitivity);
|
||||||
|
@ -289,6 +304,9 @@ void InputDialog::setDefaults()
|
||||||
// Mouse/paddle enabled
|
// Mouse/paddle enabled
|
||||||
myMouseEnabled->setState(true);
|
myMouseEnabled->setState(true);
|
||||||
|
|
||||||
|
// Grab mouse
|
||||||
|
myGrabMouse->setState(true);
|
||||||
|
|
||||||
// Paddle speed (digital and mouse)
|
// Paddle speed (digital and mouse)
|
||||||
myDPaddleSpeed->setValue(5);
|
myDPaddleSpeed->setValue(5);
|
||||||
myDPaddleLabel->setLabel("5");
|
myDPaddleLabel->setLabel("5");
|
||||||
|
|
|
@ -81,6 +81,7 @@ class InputDialog : public Dialog
|
||||||
StaticTextWidget* myMPaddleLabel;
|
StaticTextWidget* myMPaddleLabel;
|
||||||
CheckboxWidget* myAllowAll4;
|
CheckboxWidget* myAllowAll4;
|
||||||
CheckboxWidget* myMouseEnabled;
|
CheckboxWidget* myMouseEnabled;
|
||||||
|
CheckboxWidget* myGrabMouse;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue