mirror of https://github.com/stella-emu/stella.git
Made the lines on the menu boxes look a little better in the SDL
OpenGL port. Added a FrameBufferSDL::refresh() method that's triggered when the window needs to be redrawn (SDL_VIDEOEXPOSE event). git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@217 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
7efab7f29c
commit
0058d868a4
|
@ -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.6 2003-11-22 20:13:11 stephena Exp $
|
||||
// $Id: FrameBufferGL.cxx,v 1.7 2003-11-23 20:54:59 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <SDL.h>
|
||||
|
@ -313,6 +313,7 @@ void FrameBufferGL::drawBoundedBox(uInt32 x, uInt32 y, uInt32 w, uInt32 h)
|
|||
glRecti(x, y, x+w, y+h);
|
||||
|
||||
// Now draw the outer edges
|
||||
glLineWidth(theZoomLevel/2);
|
||||
glColor4f(0.8, 0.8, 0.8, 1.0);
|
||||
glBegin(GL_LINE_LOOP);
|
||||
glVertex2i(x, y ); // Top Left
|
||||
|
|
|
@ -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: FrameBufferSDL.hxx,v 1.5 2003-11-17 17:43:39 stephena Exp $
|
||||
// $Id: FrameBufferSDL.hxx,v 1.6 2003-11-23 20:54:59 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef FRAMEBUFFER_SDL_HXX
|
||||
|
@ -34,7 +34,7 @@
|
|||
the core FrameBuffer.
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: FrameBufferSDL.hxx,v 1.5 2003-11-17 17:43:39 stephena Exp $
|
||||
@version $Id: FrameBufferSDL.hxx,v 1.6 2003-11-23 20:54:59 stephena Exp $
|
||||
*/
|
||||
class FrameBufferSDL : public FrameBuffer
|
||||
{
|
||||
|
@ -92,6 +92,12 @@ class FrameBufferSDL : public FrameBuffer
|
|||
*/
|
||||
uInt32 maxWindowSizeForScreen();
|
||||
|
||||
/**
|
||||
Indicates that a redraw should be done, since the window contents
|
||||
are dirty.
|
||||
*/
|
||||
void refresh() { theRedrawEntireFrameIndicator = true; }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// The following methods are derived from FrameBuffer.hxx
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -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: mainSDL.cxx,v 1.60 2003-11-19 15:57:10 stephena Exp $
|
||||
// $Id: mainSDL.cxx,v 1.61 2003-11-23 20:54:59 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <fstream>
|
||||
|
@ -517,6 +517,10 @@ void handleEvents()
|
|||
{
|
||||
theConsole->eventHandler().sendEvent(Event::Quit, 1);
|
||||
}
|
||||
else if(event.type == SDL_VIDEOEXPOSE)
|
||||
{
|
||||
theDisplay->refresh();
|
||||
}
|
||||
|
||||
#ifdef HAVE_JOYSTICK
|
||||
// Read joystick events and modify event states
|
||||
|
|
Loading…
Reference in New Issue