mirror of https://github.com/stella-emu/stella.git
Clean up some references to OpenGL buffer type, which actually
mean 'hardware-accelerated, double-buffered'. This distinction is important, since eventually such a mode won't necessarily be OpenGL-backed (it might be Direct3D, OpenGLES, etc). git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2312 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
1da5fe515b
commit
a7710ab1af
|
@ -116,7 +116,7 @@ class FrameBufferGL : public FrameBuffer
|
||||||
/**
|
/**
|
||||||
This method is called to query the type of the FrameBuffer.
|
This method is called to query the type of the FrameBuffer.
|
||||||
*/
|
*/
|
||||||
BufferType type() const { return kGLBuffer; }
|
BufferType type() const { return kDoubleBuffer; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is called to get the specified scanline data.
|
This method is called to get the specified scanline data.
|
||||||
|
|
|
@ -255,7 +255,7 @@ void FrameBuffer::update()
|
||||||
{
|
{
|
||||||
// When onscreen messages are enabled in double-buffer mode,
|
// When onscreen messages are enabled in double-buffer mode,
|
||||||
// a full redraw is required
|
// a full redraw is required
|
||||||
myOSystem->menu().draw(myMsg.enabled && type() == kGLBuffer);
|
myOSystem->menu().draw(myMsg.enabled && type() == kDoubleBuffer);
|
||||||
break; // S_MENU
|
break; // S_MENU
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ void FrameBuffer::update()
|
||||||
{
|
{
|
||||||
// When onscreen messages are enabled in double-buffer mode,
|
// When onscreen messages are enabled in double-buffer mode,
|
||||||
// a full redraw is required
|
// a full redraw is required
|
||||||
myOSystem->commandMenu().draw(myMsg.enabled && type() == kGLBuffer);
|
myOSystem->commandMenu().draw(myMsg.enabled && type() == kDoubleBuffer);
|
||||||
break; // S_CMDMENU
|
break; // S_CMDMENU
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,7 +271,7 @@ void FrameBuffer::update()
|
||||||
{
|
{
|
||||||
// When onscreen messages are enabled in double-buffer mode,
|
// When onscreen messages are enabled in double-buffer mode,
|
||||||
// a full redraw is required
|
// a full redraw is required
|
||||||
myOSystem->launcher().draw(myMsg.enabled && type() == kGLBuffer);
|
myOSystem->launcher().draw(myMsg.enabled && type() == kDoubleBuffer);
|
||||||
break; // S_LAUNCHER
|
break; // S_LAUNCHER
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ void FrameBuffer::update()
|
||||||
{
|
{
|
||||||
// When onscreen messages are enabled in double-buffer mode,
|
// When onscreen messages are enabled in double-buffer mode,
|
||||||
// a full redraw is required
|
// a full redraw is required
|
||||||
myOSystem->debugger().draw(myMsg.enabled && type() == kGLBuffer);
|
myOSystem->debugger().draw(myMsg.enabled && type() == kDoubleBuffer);
|
||||||
break; // S_DEBUGGER
|
break; // S_DEBUGGER
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -448,7 +448,7 @@ void FrameBuffer::refresh()
|
||||||
// This method is in essence a FULL refresh, putting all rendering
|
// This method is in essence a FULL refresh, putting all rendering
|
||||||
// buffers in a known, fully redrawn state
|
// buffers in a known, fully redrawn state
|
||||||
|
|
||||||
bool doubleBuffered = (type() == kGLBuffer);
|
bool doubleBuffered = (type() == kDoubleBuffer);
|
||||||
switch(myOSystem->eventHandler().state())
|
switch(myOSystem->eventHandler().state())
|
||||||
{
|
{
|
||||||
case EventHandler::S_EMULATE:
|
case EventHandler::S_EMULATE:
|
||||||
|
|
|
@ -41,7 +41,7 @@ namespace GUI {
|
||||||
// Different types of framebuffer derived objects
|
// Different types of framebuffer derived objects
|
||||||
enum BufferType {
|
enum BufferType {
|
||||||
kSoftBuffer,
|
kSoftBuffer,
|
||||||
kGLBuffer
|
kDoubleBuffer
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return values for initialization of framebuffer window
|
// Return values for initialization of framebuffer window
|
||||||
|
|
|
@ -134,7 +134,7 @@ void MT24LC256::update()
|
||||||
(jpee_mdat && jpee_sdat && jpee_mclk && (jpee_data_start(),1), jpee_mdat = 0))
|
(jpee_mdat && jpee_sdat && jpee_mclk && (jpee_data_start(),1), jpee_mdat = 0))
|
||||||
|
|
||||||
// These pins have to be updated at the same time
|
// These pins have to be updated at the same time
|
||||||
// However, there's no guarantee that the writeSDA() and writeSDL()
|
// However, there's no guarantee that the writeSDA() and writeSCL()
|
||||||
// methods will be called at the same time or in the correct order, so
|
// methods will be called at the same time or in the correct order, so
|
||||||
// we only do the write when they have the same 'timestamp'
|
// we only do the write when they have the same 'timestamp'
|
||||||
if(myCyclesWhenSDASet == myCyclesWhenSCLSet)
|
if(myCyclesWhenSDASet == myCyclesWhenSCLSet)
|
||||||
|
|
|
@ -27,26 +27,16 @@
|
||||||
#include "Settings.hxx"
|
#include "Settings.hxx"
|
||||||
|
|
||||||
#include "FrameBuffer.hxx"
|
#include "FrameBuffer.hxx"
|
||||||
|
#include "FrameBufferSoft.hxx"
|
||||||
#ifdef DISPLAY_OPENGL
|
#ifdef DISPLAY_OPENGL
|
||||||
#include "FrameBufferGL.hxx"
|
#include "FrameBufferGL.hxx"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(GP2X)
|
|
||||||
#include "FrameBufferGP2X.hxx"
|
|
||||||
#elif defined (_WIN32_WCE)
|
|
||||||
#include "FrameBufferWinCE.hxx"
|
|
||||||
#else
|
|
||||||
#include "FrameBufferSoft.hxx"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "Sound.hxx"
|
#include "Sound.hxx"
|
||||||
#include "SoundNull.hxx"
|
|
||||||
#ifdef SOUND_SUPPORT
|
#ifdef SOUND_SUPPORT
|
||||||
#ifndef _WIN32_WCE
|
#include "SoundSDL.hxx"
|
||||||
#include "SoundSDL.hxx"
|
#else
|
||||||
#else
|
#include "SoundNull.hxx"
|
||||||
#include "SoundWinCE.hxx"
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -67,15 +57,7 @@ FrameBuffer* MediaFactory::createVideo(OSystem* osystem)
|
||||||
// If OpenGL failed, or if it wasn't requested, create the appropriate
|
// If OpenGL failed, or if it wasn't requested, create the appropriate
|
||||||
// software framebuffer
|
// software framebuffer
|
||||||
if(!fb)
|
if(!fb)
|
||||||
{
|
|
||||||
#if defined (GP2X)
|
|
||||||
fb = new FrameBufferGP2X(osystem);
|
|
||||||
#elif defined (_WIN32_WCE)
|
|
||||||
fb = new FrameBufferWinCE(osystem);
|
|
||||||
#else
|
|
||||||
fb = new FrameBufferSoft(osystem);
|
fb = new FrameBufferSoft(osystem);
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// This should never happen
|
// This should never happen
|
||||||
assert(fb != NULL);
|
assert(fb != NULL);
|
||||||
|
@ -89,11 +71,7 @@ Sound* MediaFactory::createAudio(OSystem* osystem)
|
||||||
Sound* sound = (Sound*) NULL;
|
Sound* sound = (Sound*) NULL;
|
||||||
|
|
||||||
#ifdef SOUND_SUPPORT
|
#ifdef SOUND_SUPPORT
|
||||||
#if defined (_WIN32_WCE)
|
sound = new SoundSDL(osystem);
|
||||||
sound = new SoundWinCE(osystem);
|
|
||||||
#else
|
|
||||||
sound = new SoundSDL(osystem);
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
sound = new SoundNull(osystem);
|
sound = new SoundNull(osystem);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -446,7 +446,7 @@ FBInitStatus OSystem::createFrameBuffer()
|
||||||
// Otherwise, pass the error to the parent
|
// Otherwise, pass the error to the parent
|
||||||
fallback:
|
fallback:
|
||||||
if(fbstatus == kFailNotSupported && myFrameBuffer &&
|
if(fbstatus == kFailNotSupported && myFrameBuffer &&
|
||||||
myFrameBuffer->type() == kGLBuffer)
|
myFrameBuffer->type() == kDoubleBuffer)
|
||||||
{
|
{
|
||||||
logMessage("ERROR: OpenGL mode failed, fallback to software\n", 0);
|
logMessage("ERROR: OpenGL mode failed, fallback to software\n", 0);
|
||||||
delete myFrameBuffer; myFrameBuffer = NULL;
|
delete myFrameBuffer; myFrameBuffer = NULL;
|
||||||
|
|
|
@ -295,7 +295,7 @@ VideoDialog::~VideoDialog()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void VideoDialog::loadConfig()
|
void VideoDialog::loadConfig()
|
||||||
{
|
{
|
||||||
bool gl = (instance().frameBuffer().type() == kGLBuffer);
|
bool gl = (instance().frameBuffer().type() == kDoubleBuffer);
|
||||||
|
|
||||||
// Renderer settings
|
// Renderer settings
|
||||||
myRenderer->setLabel(gl ? "OpenGL" : "Software");
|
myRenderer->setLabel(gl ? "OpenGL" : "Software");
|
||||||
|
|
Loading…
Reference in New Issue