mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 04:38:49 +00:00
CoreTiming: Merge ScheduleEvent variants into one function
Now Core::IsCPUThread() only gets called once when using the AnyThread variant. Also, I think the enum approach makes calling code clearer.
This commit is contained in:
parent
088f7eaa3d
commit
3443a10030
15 changed files with 99 additions and 94 deletions
|
@ -277,10 +277,11 @@ static void RaiseEvent()
|
|||
return;
|
||||
|
||||
s_event_raised = true;
|
||||
|
||||
CoreTiming::FromThread from = CoreTiming::FromThread::NON_CPU;
|
||||
if (!SConfig::GetInstance().bCPUThread || Fifo::UseDeterministicGPUThread())
|
||||
CoreTiming::ScheduleEvent(0, et_SetTokenFinishOnMainThread, 0);
|
||||
else
|
||||
CoreTiming::ScheduleEvent_Threadsafe(0, et_SetTokenFinishOnMainThread, 0);
|
||||
from = CoreTiming::FromThread::CPU;
|
||||
CoreTiming::ScheduleEvent(0, et_SetTokenFinishOnMainThread, 0, from);
|
||||
}
|
||||
|
||||
// SetToken
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue