From 138d72313e3916d62955b565c39e0768a180a464 Mon Sep 17 00:00:00 2001 From: comex Date: Wed, 19 Nov 2014 21:05:56 -0500 Subject: [PATCH] Add a quick check to ScheduleEvent_Threadsafe to ensure it doesn't happen in deterministic mode. --- Source/Core/Core/CoreTiming.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/Core/CoreTiming.cpp b/Source/Core/Core/CoreTiming.cpp index 8b92f72f35..727c4d3059 100644 --- a/Source/Core/Core/CoreTiming.cpp +++ b/Source/Core/Core/CoreTiming.cpp @@ -226,6 +226,12 @@ u64 GetIdleTicks() void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata) { _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 lk(tsWriteLock); Event ne; ne.time = globalTimer + cyclesIntoFuture;