mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
other experimental commit:
applied mlkbouba patch to make Mario Strikers Charged Football work (i do not own the game so please test). some minor tweaks to the plugins to improve performance. for game that do not use xfb the best settings are dual core enabled, audio throtle disabled, frame limit set to the desired value, and xfb off. change the frameskip calculations to use fps instead of vps as in dual core vps != fps caused by unresolved sync problems, till this problems are fixed the best for game play is calculate times in base of fps. please test and let me know the results git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5239 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -775,18 +775,20 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE
|
||||
glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
|
||||
glClear(bits);
|
||||
}
|
||||
|
||||
static bool XFBWrited = false;
|
||||
void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc)
|
||||
{
|
||||
s_skipSwap = g_bSkipCurrentFrame;
|
||||
|
||||
VideoFifo_CheckEFBAccess();
|
||||
//VideoFifo_CheckEFBAccess();
|
||||
|
||||
// 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);
|
||||
if (g_ActiveConfig.bUseXFB)
|
||||
VideoFifo_CheckSwapRequestAt(xfbAddr, fbWidth, fbHeight);
|
||||
|
||||
g_framebufferManager.CopyToXFB(xfbAddr, fbWidth, fbHeight, sourceRc);
|
||||
|
||||
XFBWrited = true;
|
||||
// XXX: Without the VI, how would we know what kind of field this is? So
|
||||
// just use progressive.
|
||||
if (!g_ActiveConfig.bUseXFB)
|
||||
@ -804,7 +806,8 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||
g_VideoInitialize.pCopiedToXFB(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!XFBWrited)
|
||||
return;
|
||||
if (field == FIELD_LOWER)
|
||||
xfbAddr -= fbWidth * 2;
|
||||
|
||||
@ -1142,6 +1145,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||
// SaveTexture("tex.tga", GL_TEXTURE_RECTANGLE_ARB, s_FakeZTarget, GetTargetWidth(), GetTargetHeight());
|
||||
|
||||
g_VideoInitialize.pCopiedToXFB(false);
|
||||
XFBWrited = false;
|
||||
}
|
||||
|
||||
// Create On-Screen-Messages
|
||||
|
@ -516,14 +516,14 @@ void VideoFifo_CheckSwapRequestAt(u32 xfbAddr, u32 fbWidth, u32 fbHeight)
|
||||
// Run from the CPU thread (from VideoInterface.cpp)
|
||||
void Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||
{
|
||||
if (s_PluginInitialized)
|
||||
if (s_PluginInitialized && g_ActiveConfig.bUseXFB)
|
||||
{
|
||||
// Make sure previous swap request has made it to the screen
|
||||
if (g_VideoInitialize.bOnThread)
|
||||
{
|
||||
while (Common::AtomicLoadAcquire(s_swapRequested) && !s_FifoShuttingDown)
|
||||
Common::SleepCurrentThread(1);
|
||||
//Common::YieldCPU();
|
||||
//Common::SleepCurrentThread(1);
|
||||
Common::YieldCPU();
|
||||
}
|
||||
else
|
||||
VideoFifo_CheckSwapRequest();
|
||||
@ -574,8 +574,8 @@ u32 Video_AccessEFB(EFBAccessType type, u32 x, u32 y)
|
||||
if (g_VideoInitialize.bOnThread)
|
||||
{
|
||||
while (Common::AtomicLoadAcquire(s_efbAccessRequested) && !s_FifoShuttingDown)
|
||||
Common::SleepCurrentThread(1);
|
||||
//Common::YieldCPU();
|
||||
//Common::SleepCurrentThread(1);
|
||||
Common::YieldCPU();
|
||||
}
|
||||
else
|
||||
VideoFifo_CheckEFBAccess();
|
||||
|
Reference in New Issue
Block a user