- The DidFrameBegin callback now reports whether frameskip was requested or not.
This commit is contained in:
rogerman 2016-03-10 19:46:37 +00:00
parent e73e60cb02
commit 344290283a
3 changed files with 6 additions and 7 deletions

View File

@ -3560,12 +3560,11 @@ void GPUEngineBase::_SpriteRenderPerform(const u16 lineIndex, u16 *__restrict ds
}
else if (objMode == OBJMode_Bitmap) //sprite is in BMP format
{
srcadr = this->_SpriteAddressBMP(spriteInfo, sprSize, y);
//transparent (i think, dont bother to render?) if alpha is 0
if (spriteInfo.PaletteIndex == 0)
continue;
srcadr = this->_SpriteAddressBMP(spriteInfo, sprSize, y);
this->_RenderSpriteBMP<ISDEBUGRENDER>(i, lineIndex, dst, srcadr, dst_alpha, typeTab, prioTab, prio, lg, sprX, x, xdir, spriteInfo.PaletteIndex);
}
else if (spriteInfo.PaletteMode == PaletteMode_1x256) //256 colors
@ -6187,7 +6186,7 @@ void GPUSubsystem::RenderLine(const u16 l, bool isFrameSkipRequested)
if (l == 0)
{
this->_event->DidFrameBegin();
this->_event->DidFrameBegin(isFrameSkipRequested);
// Clear displays to black if they are turned off by the user.
if (!isFrameSkipRequested)

View File

@ -1467,7 +1467,7 @@ public:
class GPUEventHandler
{
public:
virtual void DidFrameBegin() = 0;
virtual void DidFrameBegin(bool isFrameSkipRequested) = 0;
virtual void DidFrameEnd(bool isFrameSkipped) = 0;
virtual void DidRender3DBegin() = 0;
virtual void DidRender3DEnd() = 0;
@ -1479,7 +1479,7 @@ public:
class GPUEventHandlerDefault : public GPUEventHandler
{
public:
virtual void DidFrameBegin() {};
virtual void DidFrameBegin(bool isFrameSkipRequested) {};
virtual void DidFrameEnd(bool isFrameSkipped) {};
virtual void DidRender3DBegin() {};
virtual void DidRender3DEnd() {};

View File

@ -68,7 +68,7 @@ public:
void SetOutputList(NSMutableArray *outputList, pthread_mutex_t *theMutex);
bool GetRender3DNeedsFinish();
virtual void DidFrameBegin();
virtual void DidFrameBegin(bool isFrameSkipRequested);
virtual void DidFrameEnd(bool isFrameSkipped);
virtual void DidRender3DBegin();
virtual void DidRender3DEnd();
@ -791,7 +791,7 @@ GPUEventHandlerOSX::~GPUEventHandlerOSX()
pthread_mutex_destroy(&this->_mutex3DRender);
}
void GPUEventHandlerOSX::DidFrameBegin()
void GPUEventHandlerOSX::DidFrameBegin(bool isFrameSkipRequested)
{
this->FramebufferLockWrite();
}