mirror of https://github.com/stella-emu/stella.git
Properly swallow 'Cmd' key-combo shortcut keys in OSX.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1580 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
3f81dd2c93
commit
64ec3ac8d0
|
@ -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.229 2008-12-27 23:27:32 stephena Exp $
|
// $Id: EventHandler.cxx,v 1.230 2008-12-28 22:30:40 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
@ -434,13 +434,12 @@ void EventHandler::poll(uInt32 time)
|
||||||
else if(kbdControl(mod) && state)
|
else if(kbdControl(mod) && state)
|
||||||
{
|
{
|
||||||
// These keys work in all states
|
// These keys work in all states
|
||||||
switch(int(key))
|
if(key == SDLK_q)
|
||||||
{
|
{
|
||||||
case SDLK_q:
|
|
||||||
handleEvent(Event::Quit, 1);
|
handleEvent(Event::Quit, 1);
|
||||||
break;
|
}
|
||||||
|
else if(key == SDLK_g)
|
||||||
case SDLK_g:
|
{
|
||||||
// don't change grabmouse in fullscreen mode
|
// don't change grabmouse in fullscreen mode
|
||||||
if(!myOSystem->frameBuffer().fullScreen())
|
if(!myOSystem->frameBuffer().fullScreen())
|
||||||
{
|
{
|
||||||
|
@ -448,24 +447,24 @@ void EventHandler::poll(uInt32 time)
|
||||||
myOSystem->settings().setBool("grabmouse", myGrabMouseFlag);
|
myOSystem->settings().setBool("grabmouse", myGrabMouseFlag);
|
||||||
myOSystem->frameBuffer().grabMouse(myGrabMouseFlag);
|
myOSystem->frameBuffer().grabMouse(myGrabMouseFlag);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
#ifdef MAC_OSX
|
|
||||||
case SDLK_RETURN:
|
|
||||||
myOSystem->frameBuffer().toggleFullscreen();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SDLK_EQUALS:
|
|
||||||
myOSystem->frameBuffer().changeVidMode(+1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SDLK_MINUS:
|
|
||||||
myOSystem->frameBuffer().changeVidMode(-1);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#ifdef MAC_OSX
|
||||||
|
else if(key == SDLK_RETURN)
|
||||||
|
{
|
||||||
|
myOSystem->frameBuffer().toggleFullscreen();
|
||||||
|
cerr << " toggle fullscreen\n";
|
||||||
|
}
|
||||||
|
else if(key == SDLK_EQUALS)
|
||||||
|
{
|
||||||
|
myOSystem->frameBuffer().changeVidMode(+1);
|
||||||
|
}
|
||||||
|
else if(key == SDLK_MINUS)
|
||||||
|
{
|
||||||
|
myOSystem->frameBuffer().changeVidMode(-1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
// These only work when in emulation mode
|
// These only work when in emulation mode
|
||||||
if(myState == S_EMULATE)
|
else if(myState == S_EMULATE)
|
||||||
{
|
{
|
||||||
switch(int(key))
|
switch(int(key))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue