From 1dc74f75e94e58e7859ce5efbfdac8bd7a98bf9a Mon Sep 17 00:00:00 2001 From: stephena Date: Sun, 29 May 2005 16:09:21 +0000 Subject: [PATCH] Made sure that dirty-updates are being done correctly wrt overlays. Fixed bug where sometimes the options menu wasn't being redrawn when resizing the screen. Fixed bug where saving the settings in VideoDialog sometimes made the framerate go to 0, and hence caused the application to take all CPU time. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@454 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/common/FrameBufferGL.cxx | 6 ++---- stella/src/common/FrameBufferSoft.cxx | 4 ++-- stella/src/gui/VideoDialog.cxx | 13 +++++-------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/stella/src/common/FrameBufferGL.cxx b/stella/src/common/FrameBufferGL.cxx index c9280c537..8bc8d4814 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.24 2005-05-27 18:00:47 stephena Exp $ +// $Id: FrameBufferGL.cxx,v 1.25 2005-05-29 16:09:21 stephena Exp $ //============================================================================ #include @@ -203,7 +203,7 @@ bool FrameBufferGL::createScreen() SDL_GL_SwapBuffers(); glClear(GL_COLOR_BUFFER_BIT); - theRedrawEntireFrameIndicator = true; + refresh(); return true; } @@ -470,8 +470,6 @@ bool FrameBufferGL::createTextures() glDisable(GL_DEPTH_TEST); glDisable(GL_CULL_FACE); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_TEXTURE_2D); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); diff --git a/stella/src/common/FrameBufferSoft.cxx b/stella/src/common/FrameBufferSoft.cxx index ff991c2fe..594fe87d1 100644 --- a/stella/src/common/FrameBufferSoft.cxx +++ b/stella/src/common/FrameBufferSoft.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: FrameBufferSoft.cxx,v 1.21 2005-05-16 00:02:31 stephena Exp $ +// $Id: FrameBufferSoft.cxx,v 1.22 2005-05-29 16:09:21 stephena Exp $ //============================================================================ #include @@ -88,7 +88,7 @@ bool FrameBufferSoft::createScreen() return false; } - theRedrawEntireFrameIndicator = true; + refresh(); return true; } diff --git a/stella/src/gui/VideoDialog.cxx b/stella/src/gui/VideoDialog.cxx index cc51572ca..1db762877 100644 --- a/stella/src/gui/VideoDialog.cxx +++ b/stella/src/gui/VideoDialog.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: VideoDialog.cxx,v 1.14 2005-05-26 18:56:58 stephena Exp $ +// $Id: VideoDialog.cxx,v 1.15 2005-05-29 16:09:21 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -210,10 +210,6 @@ void VideoDialog::loadConfig() else if(s == "z26") myPalettePopup->setSelectedTag(3); - // Framerate - myFrameRateSlider->setValue(instance()->settings().getInt("framerate")); - myFrameRateLabel->setLabel(instance()->settings().getString("framerate")); - // Zoom i = (instance()->settings().getInt("zoom") - 1) * 10; myZoomSlider->setValue(i); @@ -289,7 +285,8 @@ void VideoDialog::saveConfig() // Framerate i = myFrameRateSlider->getValue(); - instance()->setFramerate(i); + if(i > 0) + instance()->setFramerate(i); // Zoom i = (myZoomSlider->getValue() / 10) + 1; @@ -323,8 +320,8 @@ void VideoDialog::setDefaults() myRendererPopup->setSelectedTag(1); myFilterPopup->setSelectedTag(1); myPalettePopup->setSelectedTag(1); - myFrameRateSlider->setValue(60); - myFrameRateLabel->setLabel("60"); + myFrameRateSlider->setValue(0); + myFrameRateLabel->setLabel("0"); // For some unknown reason (ie, a bug), slider widgets can only // take certain ranges of numbers. So we have to fudge things ...