From c839ddaab18aa333ce7fdcb690b70832ec4389df Mon Sep 17 00:00:00 2001 From: stephena Date: Sun, 28 Dec 2008 23:47:09 +0000 Subject: [PATCH] Baring any last minute issues, it looks like I've finally finished with the new FrameBuffer surface-based instrastructure. Thank God, since it was really starting to get on my nerves :( Made the Alt- and Alt= keys (for changing videomodes) only be active in TIA emulation mode. This solves the final remaining positioning issues with ContextMenus, since now a ContextMenu is never onscreen when the VideoMode changes size (and hence we don't have to worry about re-positioning it). Now to fix the RomInfoWidget, and then UI-wise we'll have parity with the 2.6.1 release ... git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1583 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/Todo.txt | 4 +-- stella/src/common/FrameBufferGL.cxx | 4 ++- stella/src/emucore/EventHandler.cxx | 44 ++++++++++++++--------------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/stella/Todo.txt b/stella/Todo.txt index 09f1fbb87..2cdf34d81 100644 --- a/stella/Todo.txt +++ b/stella/Todo.txt @@ -16,10 +16,10 @@ If you would like to contribute to Stella's development then find something on the list below and send email to Bradford Mott at bwmott@acm.org or Stephen Anthony at stephena@users.sourceforge.net. - * New UI subsystem where drawing is done into separate buffers, not +X * New UI subsystem where drawing is done into separate buffers, not directly into the TIA window - * Make UI 'font-sensitive' and remove all hardcoded dimensions for +X * Make UI 'font-sensitive' and remove all hardcoded dimensions for widget/font sizes * Add option to automatically save snapshots in 1X mode (useful for diff --git a/stella/src/common/FrameBufferGL.cxx b/stella/src/common/FrameBufferGL.cxx index 3a131f3a3..ae2b0816a 100644 --- a/stella/src/common/FrameBufferGL.cxx +++ b/stella/src/common/FrameBufferGL.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: FrameBufferGL.cxx,v 1.127 2008-12-28 21:01:55 stephena Exp $ +// $Id: FrameBufferGL.cxx,v 1.128 2008-12-28 23:47:09 stephena Exp $ //============================================================================ #ifdef DISPLAY_OPENGL @@ -330,6 +330,7 @@ bool FrameBufferGL::setVidMode(VideoMode& mode) p_glPushMatrix(); p_glLoadIdentity(); +/* cerr << "dimensions: " << (fullScreen() ? "(full)" : "") << endl << " screen w = " << mode.screen_w << endl << " screen h = " << mode.screen_h << endl @@ -340,6 +341,7 @@ cerr << "dimensions: " << (fullScreen() ? "(full)" : "") << endl << " base w = " << baseWidth << endl << " base h = " << baseHeight << endl << endl; +*/ //////////////////////////////////////////////////////////////////// // Note that the following must be done in the order given diff --git a/stella/src/emucore/EventHandler.cxx b/stella/src/emucore/EventHandler.cxx index 1cfd542f4..8eecf3a0b 100644 --- a/stella/src/emucore/EventHandler.cxx +++ b/stella/src/emucore/EventHandler.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: EventHandler.cxx,v 1.231 2008-12-28 22:31:13 stephena Exp $ +// $Id: EventHandler.cxx,v 1.232 2008-12-28 23:47:09 stephena Exp $ //============================================================================ #include @@ -321,27 +321,25 @@ void EventHandler::poll(uInt32 time) // Control/Cmd or Alt/Shift-Cmd keys. So we quickly check for those. if(kbdAlt(mod) && state) { - #ifndef MAC_OSX // These keys work in all states if(key == SDLK_RETURN) { myOSystem->frameBuffer().toggleFullscreen(); } - else if(key == SDLK_EQUALS) - { - myOSystem->frameBuffer().changeVidMode(+1); - } - else if(key == SDLK_MINUS) - { - myOSystem->frameBuffer().changeVidMode(-1); - } - else - #endif // These only work when in emulation mode - if(myState == S_EMULATE) + else if(myState == S_EMULATE) { switch(int(key)) { + #ifndef MAC_OSX + case SDLK_EQUALS: + myOSystem->frameBuffer().changeVidMode(+1); + break; + + case SDLK_MINUS: + myOSystem->frameBuffer().changeVidMode(-1); + break; + #endif case SDLK_LEFTBRACKET: myOSystem->sound().adjustVolume(-1); break; @@ -453,27 +451,27 @@ void EventHandler::poll(uInt32 time) { myOSystem->frameBuffer().toggleFullscreen(); } - 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 else if(myState == S_EMULATE) { switch(int(key)) { - #ifdef MAC_OSX + #ifdef MAC_OSX + case SDLK_EQUALS: + myOSystem->frameBuffer().changeVidMode(+1); + break; + + case SDLK_MINUS: + myOSystem->frameBuffer().changeVidMode(-1); + break; + case SDLK_h: case SDLK_m: case SDLK_SLASH: handleMacOSXKeypress(int(key)); break; - #endif + #endif case SDLK_0: // Ctrl-0 sets the mouse to paddle 0 setPaddleMode(0, true); break;