GPU:
- The DidFrameBegin callback now reports whether frameskip was requested or not.
This commit is contained in:
parent
e73e60cb02
commit
344290283a
|
@ -3560,12 +3560,11 @@ void GPUEngineBase::_SpriteRenderPerform(const u16 lineIndex, u16 *__restrict ds
|
||||||
}
|
}
|
||||||
else if (objMode == OBJMode_Bitmap) //sprite is in BMP format
|
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
|
//transparent (i think, dont bother to render?) if alpha is 0
|
||||||
if (spriteInfo.PaletteIndex == 0)
|
if (spriteInfo.PaletteIndex == 0)
|
||||||
continue;
|
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);
|
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
|
else if (spriteInfo.PaletteMode == PaletteMode_1x256) //256 colors
|
||||||
|
@ -6187,7 +6186,7 @@ void GPUSubsystem::RenderLine(const u16 l, bool isFrameSkipRequested)
|
||||||
|
|
||||||
if (l == 0)
|
if (l == 0)
|
||||||
{
|
{
|
||||||
this->_event->DidFrameBegin();
|
this->_event->DidFrameBegin(isFrameSkipRequested);
|
||||||
|
|
||||||
// Clear displays to black if they are turned off by the user.
|
// Clear displays to black if they are turned off by the user.
|
||||||
if (!isFrameSkipRequested)
|
if (!isFrameSkipRequested)
|
||||||
|
|
|
@ -1467,7 +1467,7 @@ public:
|
||||||
class GPUEventHandler
|
class GPUEventHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void DidFrameBegin() = 0;
|
virtual void DidFrameBegin(bool isFrameSkipRequested) = 0;
|
||||||
virtual void DidFrameEnd(bool isFrameSkipped) = 0;
|
virtual void DidFrameEnd(bool isFrameSkipped) = 0;
|
||||||
virtual void DidRender3DBegin() = 0;
|
virtual void DidRender3DBegin() = 0;
|
||||||
virtual void DidRender3DEnd() = 0;
|
virtual void DidRender3DEnd() = 0;
|
||||||
|
@ -1479,7 +1479,7 @@ public:
|
||||||
class GPUEventHandlerDefault : public GPUEventHandler
|
class GPUEventHandlerDefault : public GPUEventHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void DidFrameBegin() {};
|
virtual void DidFrameBegin(bool isFrameSkipRequested) {};
|
||||||
virtual void DidFrameEnd(bool isFrameSkipped) {};
|
virtual void DidFrameEnd(bool isFrameSkipped) {};
|
||||||
virtual void DidRender3DBegin() {};
|
virtual void DidRender3DBegin() {};
|
||||||
virtual void DidRender3DEnd() {};
|
virtual void DidRender3DEnd() {};
|
||||||
|
|
|
@ -68,7 +68,7 @@ public:
|
||||||
void SetOutputList(NSMutableArray *outputList, pthread_mutex_t *theMutex);
|
void SetOutputList(NSMutableArray *outputList, pthread_mutex_t *theMutex);
|
||||||
bool GetRender3DNeedsFinish();
|
bool GetRender3DNeedsFinish();
|
||||||
|
|
||||||
virtual void DidFrameBegin();
|
virtual void DidFrameBegin(bool isFrameSkipRequested);
|
||||||
virtual void DidFrameEnd(bool isFrameSkipped);
|
virtual void DidFrameEnd(bool isFrameSkipped);
|
||||||
virtual void DidRender3DBegin();
|
virtual void DidRender3DBegin();
|
||||||
virtual void DidRender3DEnd();
|
virtual void DidRender3DEnd();
|
||||||
|
@ -791,7 +791,7 @@ GPUEventHandlerOSX::~GPUEventHandlerOSX()
|
||||||
pthread_mutex_destroy(&this->_mutex3DRender);
|
pthread_mutex_destroy(&this->_mutex3DRender);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPUEventHandlerOSX::DidFrameBegin()
|
void GPUEventHandlerOSX::DidFrameBegin(bool isFrameSkipRequested)
|
||||||
{
|
{
|
||||||
this->FramebufferLockWrite();
|
this->FramebufferLockWrite();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue