Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: Source/Core/Core/Src/Core.cpp
- ===================================================================
- --- Source/Core/Core/Src/Core.cpp (revision 6502)
- +++ Source/Core/Core/Src/Core.cpp (working copy)
- @@ -330,6 +330,7 @@
- VideoInitialize.pRegisterEvent = CoreTiming::RegisterEvent;
- VideoInitialize.pScheduleEvent_Threadsafe = CoreTiming::ScheduleEvent_Threadsafe;
- VideoInitialize.pRemoveEvent = CoreTiming::RemoveAllEvents;
- + VideoInitialize.pProcessFifoEvents = CoreTiming::ProcessFifoWaitEvents;
- // This is first the m_Panel handle, then it is updated to have the new window handle
- VideoInitialize.pWindowHandle = _CoreParameter.hMainWindow;
- VideoInitialize.pLog = Callback_VideoLog;
- Index: Source/Core/VideoCommon/Src/CommandProcessor.cpp
- ===================================================================
- --- Source/Core/VideoCommon/Src/CommandProcessor.cpp (revision 6503)
- +++ Source/Core/VideoCommon/Src/CommandProcessor.cpp (working copy)
- @@ -380,6 +380,8 @@
- {
- while (fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance)
- s_fifoIdleEvent.Wait();
- + g_VideoInitialize.pProcessFifoEvents();
- +
- }
- else
- {
- @@ -411,7 +413,9 @@
- if (tmpCtrl.FifoOverflowIntEnable)
- m_CPStatusReg.OverflowHiWatermark = false;
- -
- +
- + if (g_VideoInitialize.bOnThread)
- + g_VideoInitialize.pRemoveEvent(et_UpdateInterrupts);
- UpdateInterrupts();
- // If the new fifo is being attached We make sure there wont be SetFinish event pending.
- @@ -426,9 +430,9 @@
- fifo.bFF_BPEnable = tmpCtrl.BPEnable;
- if(tmpFifoGPReadEnable == fifo.bFF_GPReadEnable)
- {
- - fifo.bFF_GPReadEnable = tmpCtrl.GPReadEnable;
- -
- - if (fifo.bFF_GPReadEnable && (fifo.CPReadWriteDistance >= fifo.CPHiWatermark))
- + fifo.bFF_GPReadEnable = tmpCtrl.GPReadEnable;
- +
- + if (g_VideoInitialize.bOnThread && fifo.bFF_GPReadEnable && (fifo.CPReadWriteDistance >= fifo.CPHiWatermark))
- {
- // A little trick to prevent FIFO from overflown in dual core mode
- while (fifo.bFF_GPReadEnable && (fifo.CPReadWriteDistance >= fifo.CPHiWatermark))
- @@ -460,6 +464,9 @@
- m_CPStatusReg.OverflowHiWatermark = false;
- if (tmpCtrl.ClearFifoUnderflow)
- Common::AtomicStore(fifo.CPReadIdle, false);
- +
- + if (g_VideoInitialize.bOnThread)
- + g_VideoInitialize.pRemoveEvent(et_UpdateInterrupts);
- UpdateInterrupts();
- DEBUG_LOG(COMMANDPROCESSOR,"\t write to CLEAR_REGISTER : %04x", _Value);
- }
- @@ -560,7 +567,13 @@
- }
- if (!g_VideoInitialize.bOnThread)
- + {
- CatchUpGPU();
- + }
- + else
- + {
- + g_VideoInitialize.pProcessFifoEvents();
- + }
- }
- void Read32(u32& _rReturnValue, const u32 _Address)
- @@ -604,6 +617,8 @@
- {
- if (!g_VideoInitialize.bOnThread)
- CatchUpGPU();
- + else
- + g_VideoInitialize.pProcessFifoEvents();
- return;
- }
- @@ -628,8 +643,12 @@
- if (!m_CPStatusReg.OverflowHiWatermark)
- {
- m_CPStatusReg.OverflowHiWatermark = true;
- +
- if (m_CPCtrlReg.FifoOverflowIntEnable)
- + {
- + g_VideoInitialize.pRemoveEvent(et_UpdateInterrupts);
- UpdateInterrupts();
- + }
- }
- }
- @@ -638,11 +657,15 @@
- else
- {
- CatchUpGPU();
- + g_VideoInitialize.pProcessFifoEvents();
- if (!m_CPStatusReg.OverflowHiWatermark && fifo.CPReadWriteDistance >= fifo.CPHiWatermark)
- {
- m_CPStatusReg.OverflowHiWatermark = true;
- if (m_CPCtrlReg.FifoOverflowIntEnable)
- + {
- + g_VideoInitialize.pRemoveEvent(et_UpdateInterrupts);
- UpdateInterrupts();
- + }
- }
- }
- Index: Source/PluginSpecs/pluginspecs_video.h
- ===================================================================
- --- Source/PluginSpecs/pluginspecs_video.h (revision 6502)
- +++ Source/PluginSpecs/pluginspecs_video.h (working copy)
- @@ -15,6 +15,7 @@
- typedef int (*TRegisterEvent)(const char *name, TimedCallback callback);
- typedef void (*TScheduleEvent_Threadsafe)(int cyclesIntoFuture, int event_type, u64 userdata, bool fifoWait);
- typedef void (*TRemoveEvent)(int event_type);
- +typedef void (*TProcessFifoEvents)(void);
- typedef unsigned char* (*TGetMemoryPointer)(const unsigned int _iAddress);
- typedef void (*TVideoLog)(const char* _pMessage, int _bBreak);
- typedef void (*TSysMessage)(const char *fmt, ...);
- @@ -76,6 +77,7 @@
- TRegisterEvent pRegisterEvent;
- TScheduleEvent_Threadsafe pScheduleEvent_Threadsafe;
- TRemoveEvent pRemoveEvent;
- + TProcessFifoEvents pProcessFifoEvents;
- TGetMemoryPointer pGetMemoryPointer;
- TVideoLog pLog;
- TSysMessage pSysMessage;
- @@ -191,5 +193,6 @@
- EXPORT void CALL Video_AbortFrame(void);
- +
- #include "ExportEpilog.h"
- #endif
Add Comment
Please, Sign In to add comment