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
This commit is contained in:
stephena 2005-05-29 16:09:21 +00:00
parent 5c1775d45c
commit 1dc74f75e9
3 changed files with 9 additions and 14 deletions

View File

@ -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: 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 <SDL.h> #include <SDL.h>
@ -203,7 +203,7 @@ bool FrameBufferGL::createScreen()
SDL_GL_SwapBuffers(); SDL_GL_SwapBuffers();
glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT);
theRedrawEntireFrameIndicator = true; refresh();
return true; return true;
} }
@ -470,8 +470,6 @@ bool FrameBufferGL::createTextures()
glDisable(GL_DEPTH_TEST); glDisable(GL_DEPTH_TEST);
glDisable(GL_CULL_FACE); glDisable(GL_CULL_FACE);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);

View File

@ -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: 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 <SDL.h> #include <SDL.h>
@ -88,7 +88,7 @@ bool FrameBufferSoft::createScreen()
return false; return false;
} }
theRedrawEntireFrameIndicator = true; refresh();
return true; return true;
} }

View File

@ -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: 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 // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -210,10 +210,6 @@ void VideoDialog::loadConfig()
else if(s == "z26") else if(s == "z26")
myPalettePopup->setSelectedTag(3); myPalettePopup->setSelectedTag(3);
// Framerate
myFrameRateSlider->setValue(instance()->settings().getInt("framerate"));
myFrameRateLabel->setLabel(instance()->settings().getString("framerate"));
// Zoom // Zoom
i = (instance()->settings().getInt("zoom") - 1) * 10; i = (instance()->settings().getInt("zoom") - 1) * 10;
myZoomSlider->setValue(i); myZoomSlider->setValue(i);
@ -289,7 +285,8 @@ void VideoDialog::saveConfig()
// Framerate // Framerate
i = myFrameRateSlider->getValue(); i = myFrameRateSlider->getValue();
instance()->setFramerate(i); if(i > 0)
instance()->setFramerate(i);
// Zoom // Zoom
i = (myZoomSlider->getValue() / 10) + 1; i = (myZoomSlider->getValue() / 10) + 1;
@ -323,8 +320,8 @@ void VideoDialog::setDefaults()
myRendererPopup->setSelectedTag(1); myRendererPopup->setSelectedTag(1);
myFilterPopup->setSelectedTag(1); myFilterPopup->setSelectedTag(1);
myPalettePopup->setSelectedTag(1); myPalettePopup->setSelectedTag(1);
myFrameRateSlider->setValue(60); myFrameRateSlider->setValue(0);
myFrameRateLabel->setLabel("60"); myFrameRateLabel->setLabel("0");
// For some unknown reason (ie, a bug), slider widgets can only // For some unknown reason (ie, a bug), slider widgets can only
// take certain ranges of numbers. So we have to fudge things ... // take certain ranges of numbers. So we have to fudge things ...