mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 07:21:14 +01:00
Add a quick check to ScheduleEvent_Threadsafe to ensure it doesn't happen in deterministic mode.
This commit is contained in:
parent
dc91e8b607
commit
138d72313e
@ -226,6 +226,12 @@ u64 GetIdleTicks()
|
|||||||
void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata)
|
void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata)
|
||||||
{
|
{
|
||||||
_assert_msg_(POWERPC, !Core::IsCPUThread(), "ScheduleEvent_Threadsafe from wrong thread");
|
_assert_msg_(POWERPC, !Core::IsCPUThread(), "ScheduleEvent_Threadsafe from wrong thread");
|
||||||
|
if (Core::g_want_determinism)
|
||||||
|
{
|
||||||
|
ERROR_LOG(POWERPC, "Someone scheduled an off-thread \"%s\" event while netplay or movie play/record "
|
||||||
|
"was active. This is likely to cause a desync.",
|
||||||
|
event_types[event_type].name.c_str());
|
||||||
|
}
|
||||||
std::lock_guard<std::mutex> lk(tsWriteLock);
|
std::lock_guard<std::mutex> lk(tsWriteLock);
|
||||||
Event ne;
|
Event ne;
|
||||||
ne.time = globalTimer + cyclesIntoFuture;
|
ne.time = globalTimer + cyclesIntoFuture;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user