diff --git a/Source/Core/Core/Src/CoreTiming.cpp b/Source/Core/Core/Src/CoreTiming.cpp index 35311f8154..3207112cbf 100644 --- a/Source/Core/Core/Src/CoreTiming.cpp +++ b/Source/Core/Core/Src/CoreTiming.cpp @@ -42,7 +42,6 @@ struct BaseEvent s64 time; u64 userdata; int type; - bool fifoWait; // Event *next; }; @@ -177,8 +176,7 @@ void DoState(PointerWrap &p) prev->next = ev; p.Do(ev->time); p.Do(ev->type); - p.Do(ev->userdata); - p.Do(ev->fifoWait); + p.Do(ev->userdata); ev->next = 0; prev = ev; ev = ev->next; @@ -195,8 +193,7 @@ void DoState(PointerWrap &p) p.Do(more_events); p.Do(ev->time); p.Do(ev->type); - p.Do(ev->userdata); - p.Do(ev->fifoWait); + p.Do(ev->userdata); ev = ev->next; } more_events = 0; @@ -219,7 +216,7 @@ u64 GetIdleTicks() // This is to be called when outside threads, such as the graphics thread, wants to // schedule things to be executed on the main thread. -void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata, bool fifoWait) +void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata) { externalEventSection.Enter(); Event *ne = GetNewTsEvent(); @@ -227,7 +224,6 @@ void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata ne->type = event_type; ne->next = 0; ne->userdata = userdata; - ne->fifoWait = fifoWait; if(!tsFirst) tsFirst = ne; if(tsLast) @@ -247,7 +243,7 @@ void ScheduleEvent_Threadsafe_Immediate(int event_type, u64 userdata) externalEventSection.Leave(); } else - ScheduleEvent_Threadsafe(0, event_type, userdata, false); + ScheduleEvent_Threadsafe(0, event_type, userdata); } void ClearPendingEvents() @@ -287,7 +283,6 @@ void ScheduleEvent(int cyclesIntoFuture, int event_type, u64 userdata) ne->userdata = userdata; ne->type = event_type; ne->time = globalTimer + cyclesIntoFuture; - ne->fifoWait = false; AddEventToQueue(ne); } @@ -403,7 +398,7 @@ void ProcessFifoWaitEvents() if (!first) return; - if (first->time <= globalTimer && first->fifoWait) + if (first->time <= globalTimer) { Event *next = first->next; event_types[first->type].callback(first->userdata, (int)(globalTimer - first->time)); @@ -418,7 +413,7 @@ void ProcessFifoWaitEvents() Event *ptr = prev->next; while (ptr) { - if (ptr->time <= globalTimer && ptr->fifoWait) + if (ptr->time <= globalTimer) { prev->next = ptr->next; event_types[ptr->type].callback(ptr->userdata, (int)(globalTimer - ptr->time)); diff --git a/Source/Core/Core/Src/CoreTiming.h b/Source/Core/Core/Src/CoreTiming.h index 7514727fc8..818c5a9e5f 100644 --- a/Source/Core/Core/Src/CoreTiming.h +++ b/Source/Core/Core/Src/CoreTiming.h @@ -57,7 +57,7 @@ void UnregisterAllEvents(); // userdata MAY NOT CONTAIN POINTERS. userdata might get written and reloaded from disk, // when we implement state saves. void ScheduleEvent(int cyclesIntoFuture, int event_type, u64 userdata=0); -void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata=0, bool fifoWait=true); +void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata=0); void ScheduleEvent_Threadsafe_Immediate(int event_type, u64 userdata=0); // We only permit one event of each type in the queue at a time. diff --git a/Source/Core/VideoCommon/Src/CommandProcessor.cpp b/Source/Core/VideoCommon/Src/CommandProcessor.cpp index 0dc3fc3b0b..8f9b621284 100644 --- a/Source/Core/VideoCommon/Src/CommandProcessor.cpp +++ b/Source/Core/VideoCommon/Src/CommandProcessor.cpp @@ -717,7 +717,7 @@ void UpdateInterrupts() void UpdateInterruptsFromVideoPlugin() { - g_VideoInitialize.pScheduleEvent_Threadsafe(0, et_UpdateInterrupts, 0, true); + g_VideoInitialize.pScheduleEvent_Threadsafe(0, et_UpdateInterrupts, 0); } void SetFifoIdleFromVideoPlugin() diff --git a/Source/Core/VideoCommon/Src/PixelEngine.cpp b/Source/Core/VideoCommon/Src/PixelEngine.cpp index 580571b328..4913e21cfc 100644 --- a/Source/Core/VideoCommon/Src/PixelEngine.cpp +++ b/Source/Core/VideoCommon/Src/PixelEngine.cpp @@ -343,7 +343,7 @@ void SetToken(const u16 _token, const int _bSetTokenAcknowledge) // This seems smelly... CommandProcessor::IncrementGPWDToken(); // for DC watchdog hack since PEToken seems to be a frame-finish too g_VideoInitialize.pScheduleEvent_Threadsafe( - 0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16), true); + 0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16)); } else // set token value { @@ -362,7 +362,7 @@ void SetFinish() { CommandProcessor::IncrementGPWDToken(); // for DC watchdog hack g_VideoInitialize.pScheduleEvent_Threadsafe( - 0, et_SetFinishOnMainThread, 0, true); + 0, et_SetFinishOnMainThread, 0); INFO_LOG(PIXELENGINE, "VIDEO Set Finish"); } diff --git a/Source/PluginSpecs/pluginspecs_video.h b/Source/PluginSpecs/pluginspecs_video.h index 7fde0e43fa..d6e71a5de9 100644 --- a/Source/PluginSpecs/pluginspecs_video.h +++ b/Source/PluginSpecs/pluginspecs_video.h @@ -13,7 +13,7 @@ typedef void (*TimedCallback)(u64 userdata, int cyclesLate); typedef void (*TSetInterrupt)(u32 _causemask, bool _bSet); typedef int (*TRegisterEvent)(const char *name, TimedCallback callback); -typedef void (*TScheduleEvent_Threadsafe)(int cyclesIntoFuture, int event_type, u64 userdata, bool fifoWait); +typedef void (*TScheduleEvent_Threadsafe)(int cyclesIntoFuture, int event_type, u64 userdata); typedef void (*TRemoveEvent)(int event_type); typedef unsigned char* (*TGetMemoryPointer)(const unsigned int _iAddress); typedef void (*TVideoLog)(const char* _pMessage, int _bBreak); diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/CommandProcessor.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/CommandProcessor.cpp index 200d1200e3..6b2d0733b4 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/CommandProcessor.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/CommandProcessor.cpp @@ -322,7 +322,7 @@ void UpdateInterrupts(u64 userdata) void UpdateInterruptsFromVideoPlugin(u64 userdata) { - g_VideoInitialize.pScheduleEvent_Threadsafe(0, et_UpdateInterrupts, userdata, true); + g_VideoInitialize.pScheduleEvent_Threadsafe(0, et_UpdateInterrupts, userdata); } void ReadFifo() diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/PixelEngine.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/PixelEngine.cpp index 255c195d84..119a3b5417 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/PixelEngine.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/PixelEngine.cpp @@ -155,7 +155,7 @@ void SetToken(const u16 _token, const int _bSetTokenAcknowledge) if (_bSetTokenAcknowledge) // set token INT { g_VideoInitialize.pScheduleEvent_Threadsafe( - 0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16), true); + 0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16)); } } @@ -164,7 +164,7 @@ void SetToken(const u16 _token, const int _bSetTokenAcknowledge) void SetFinish() { g_VideoInitialize.pScheduleEvent_Threadsafe( - 0, et_SetFinishOnMainThread, 0, true); + 0, et_SetFinishOnMainThread, 0); INFO_LOG(PIXELENGINE, "VIDEO Set Finish"); }