1. This should fix Issue 1625 (Bizarre Auto Frame Limit)

Now the frame limiter yields on CPU thread, not as before on GPU thread mistakenly

2. Fixed clear of VI interrupts
   I guess VI interrupts are not used at all, because they were never cleared before

3. Made GPU thread 0% processor usage when paused whatever your active config is.
   I tried the event approach but somehow the thread resume latency is excessively long (Who can tell me why?)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4790 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
ayuanx
2010-01-07 20:01:41 +00:00
parent 64167bcb60
commit 9cbd508181
15 changed files with 141 additions and 227 deletions

View File

@ -312,6 +312,7 @@ void DoState(unsigned char **ptr, int mode) {
void EmuStateChange(PLUGIN_EMUSTATE newState)
{
Fifo_RunLoop((newState == PLUGIN_EMUSTATE_PLAY) ? true : false);
}
void Video_EnterLoop()
@ -333,7 +334,7 @@ void Video_SetRendering(bool bEnabled) {
// Run from the graphics thread
void VideoFifo_CheckSwapRequest()
{
// CPU swap, not finished, seems to be working fine for dual-core for now
// swap unimplemented
return;
if (s_swapRequested)
@ -351,12 +352,15 @@ void VideoFifo_CheckSwapRequest()
// Run from the graphics thread
void VideoFifo_CheckSwapRequestAt(u32 xfbAddr, u32 fbWidth, u32 fbHeight)
{
// CPU swap unimplemented
// swap unimplemented
}
// Run from the CPU thread (from VideoInterface.cpp)
void Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
{
// swap unimplemented
return;
s_beginFieldArgs.xfbAddr = xfbAddr;
s_beginFieldArgs.field = field;
s_beginFieldArgs.fbWidth = fbWidth;
@ -365,14 +369,11 @@ void Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
if (s_initialized)
{
// Make sure previous swap request has made it to the screen
if (g_VideoInitialize.bOnThread)
{
// It seems to be working fine in this way for now without using AtomicLoadAcquire
// ector, please check here
//while (Common::AtomicLoadAcquire(s_swapRequested))
// Common::YieldCPU();
//Common::YieldCPU();
}
else
VideoFifo_CheckSwapRequest();