mirror of https://github.com/stella-emu/stella.git
Some fixes for the OSX port. Mark, do these work??
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@966 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
e75b50cab8
commit
9d1a9977c3
|
@ -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.53 2006-01-15 20:46:19 stephena Exp $
|
||||
// $Id: FrameBufferGL.cxx,v 1.54 2006-01-15 22:43:21 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifdef DISPLAY_OPENGL
|
||||
|
@ -564,9 +564,12 @@ void FrameBufferGL::enablePhosphor(bool enable)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FrameBufferGL::cls()
|
||||
{
|
||||
if(myFuncsLoaded)
|
||||
{
|
||||
p_glClear(GL_COLOR_BUFFER_BIT);
|
||||
SDL_GL_SwapBuffers();
|
||||
p_glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -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.43 2006-01-15 16:31:01 stephena Exp $
|
||||
// $Id: FrameBufferSoft.cxx,v 1.44 2006-01-15 22:43:21 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <SDL.h>
|
||||
|
@ -95,6 +95,18 @@ bool FrameBufferSoft::createScreen()
|
|||
cerr << "ERROR: Unable to open SDL window: " << SDL_GetError() << endl;
|
||||
return false;
|
||||
}
|
||||
switch(myScreen->format->BitsPerPixel)
|
||||
{
|
||||
case 16:
|
||||
myPitch = myScreen->pitch/2;
|
||||
break;
|
||||
case 24:
|
||||
myPitch = myScreen->pitch/3;
|
||||
break;
|
||||
case 32:
|
||||
myPitch = myScreen->pitch/4;
|
||||
break;
|
||||
}
|
||||
myOSystem->eventHandler().refreshDisplay();
|
||||
|
||||
return true;
|
||||
|
@ -289,7 +301,7 @@ void FrameBufferSoft::drawMediaSource()
|
|||
buffer[pos++] = (uInt16) myAvgPalette[v][w];
|
||||
}
|
||||
}
|
||||
screenofsY += myScreen->w;
|
||||
screenofsY += myPitch;
|
||||
}
|
||||
bufofsY += width;
|
||||
}
|
||||
|
@ -330,7 +342,7 @@ void FrameBufferSoft::drawMediaSource()
|
|||
buffer[pos++] = (uInt16) myAvgPalette[v][w];
|
||||
}
|
||||
}
|
||||
screenofsY += myScreen->w;
|
||||
screenofsY += myPitch;
|
||||
}
|
||||
bufofsY += width;
|
||||
}
|
||||
|
@ -370,7 +382,7 @@ void FrameBufferSoft::drawMediaSource()
|
|||
buffer[pos++] = (uInt32) myAvgPalette[v][w];
|
||||
}
|
||||
}
|
||||
screenofsY += myScreen->w;
|
||||
screenofsY += myPitch;
|
||||
}
|
||||
bufofsY += width;
|
||||
}
|
||||
|
@ -616,12 +628,15 @@ void FrameBufferSoft::enablePhosphor(bool enable)
|
|||
switch(myScreen->format->BitsPerPixel)
|
||||
{
|
||||
case 16:
|
||||
myPitch = myScreen->pitch/2;
|
||||
myRenderType = kPhosphor_16;
|
||||
break;
|
||||
case 24:
|
||||
myPitch = myScreen->pitch/3;
|
||||
myRenderType = kPhosphor_24;
|
||||
break;
|
||||
case 32:
|
||||
myPitch = myScreen->pitch/4;
|
||||
myRenderType = kPhosphor_32;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -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.hxx,v 1.29 2006-01-15 16:31:01 stephena Exp $
|
||||
// $Id: FrameBufferSoft.hxx,v 1.30 2006-01-15 22:43:21 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef FRAMEBUFFER_SOFT_HXX
|
||||
|
@ -35,7 +35,7 @@ class RectList;
|
|||
This class implements an SDL software framebuffer.
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: FrameBufferSoft.hxx,v 1.29 2006-01-15 16:31:01 stephena Exp $
|
||||
@version $Id: FrameBufferSoft.hxx,v 1.30 2006-01-15 22:43:21 stephena Exp $
|
||||
*/
|
||||
class FrameBufferSoft : public FrameBuffer
|
||||
{
|
||||
|
@ -204,6 +204,8 @@ class FrameBufferSoft : public FrameBuffer
|
|||
RectList* myOverlayRectList;
|
||||
|
||||
private:
|
||||
int myPitch;
|
||||
|
||||
enum RenderType {
|
||||
kSoftZoom,
|
||||
kPhosphor_16,
|
||||
|
|
Loading…
Reference in New Issue