mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Just a few fixes for the fps counter, also unbreak direct XFB homebrews.
And a couple of fixes for the frameskip : disabled by default, can be set before launching a game, also safer to avoid lockup. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3950 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -795,23 +795,18 @@ void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRect
|
||||
{
|
||||
s_skipSwap = g_bSkipCurrentFrame;
|
||||
|
||||
g_VideoInitialize.pCopiedToXFB(false);
|
||||
|
||||
#ifdef XXX_ENABLE_CPU_CONTROLLED_SWAPPING
|
||||
// If we're about to write to a requested XFB, make sure the previous
|
||||
// contents make it to the screen first.
|
||||
VideoFifo_CheckSwapRequestAt(xfbAddr, fbWidth, fbHeight);
|
||||
|
||||
s_framebufferManager.CopyToXFB(xfbAddr, fbWidth, fbHeight, sourceRc);
|
||||
#else
|
||||
s_framebufferManager.CopyToXFB(xfbAddr, fbWidth, fbHeight, sourceRc);
|
||||
|
||||
// TODO: Find better name for this because I don't know if it means what it says.
|
||||
g_VideoInitialize.pCopiedToXFB(false);
|
||||
|
||||
#ifndef XXX_ENABLE_CPU_CONTROLLED_SWAPPING
|
||||
// XXX: Without the VI, how would we know what kind of field this is? So
|
||||
// just use progressive.
|
||||
Renderer::Swap(xfbAddr, FIELD_PROGRESSIVE, fbWidth, fbHeight);
|
||||
|
||||
// TODO: Find better name for this because I don't know if it means what it says.
|
||||
g_VideoInitialize.pCopiedToXFB(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -106,6 +106,7 @@ static bool s_PluginInitialized = false;
|
||||
|
||||
static u32 s_swapRequested = FALSE;
|
||||
static u32 s_efbAccessRequested = FALSE;
|
||||
static bool ForceSwap = true;
|
||||
|
||||
void GetDllInfo (PLUGIN_INFO* _PluginInfo)
|
||||
{
|
||||
@ -467,11 +468,17 @@ void VideoFifo_CheckSwapRequest()
|
||||
{
|
||||
#ifdef XXX_ENABLE_CPU_CONTROLLED_SWAPPING
|
||||
Renderer::Swap(s_beginFieldArgs.xfbAddr, s_beginFieldArgs.field, s_beginFieldArgs.fbWidth, s_beginFieldArgs.fbHeight);
|
||||
|
||||
// TODO: Find better name for this because I don't know if it means what it says.
|
||||
g_VideoInitialize.pCopiedToXFB(true);
|
||||
#else
|
||||
if (ForceSwap)
|
||||
{
|
||||
Renderer::Swap(s_beginFieldArgs.xfbAddr, s_beginFieldArgs.field, s_beginFieldArgs.fbWidth, s_beginFieldArgs.fbHeight);
|
||||
g_VideoInitialize.pCopiedToXFB(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
// TODO : This just updates the frame counter, so we may change this func's name as well
|
||||
g_VideoInitialize.pCopiedToXFB(true);
|
||||
|
||||
Common::AtomicStoreRelease(s_swapRequested, FALSE);
|
||||
}
|
||||
}
|
||||
@ -484,6 +491,7 @@ inline bool addrRangesOverlap(u32 aLower, u32 aUpper, u32 bLower, u32 bUpper)
|
||||
// Run from the graphics thread (from Fifo.cpp)
|
||||
void VideoFifo_CheckSwapRequestAt(u32 xfbAddr, u32 fbWidth, u32 fbHeight)
|
||||
{
|
||||
#ifdef XXX_ENABLE_CPU_CONTROLLED_SWAPPING
|
||||
if (Common::AtomicLoadAcquire(s_swapRequested))
|
||||
{
|
||||
u32 aLower = xfbAddr;
|
||||
@ -494,6 +502,9 @@ void VideoFifo_CheckSwapRequestAt(u32 xfbAddr, u32 fbWidth, u32 fbHeight)
|
||||
if (addrRangesOverlap(aLower, aUpper, bLower, bUpper))
|
||||
VideoFifo_CheckSwapRequest();
|
||||
}
|
||||
#else
|
||||
ForceSwap = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Run from the CPU thread (from VideoInterface.cpp)
|
||||
|
Reference in New Issue
Block a user