Keep the extension's tick out of REAPER's own project load, and re-earn the park holds across one load
This commit is contained in:
@@ -183,6 +183,17 @@ static void OnTimer()
|
||||
// the idle fast-path is a SINGLE POINTER TEST — drive only when a capture is live.
|
||||
if (capture::g_rtCapture) capture::DriveRealtimeCapture(g_session);
|
||||
|
||||
// A project load or save is IN FLIGHT, so this tick is running inside its own message
|
||||
// pump — a restore brings plugins online and a plugin load pumps. Everything below
|
||||
// would then act on a half-restored project: poll() reads the pre-load <EXTSTATE> that
|
||||
// OnBeginLoadProjectState defers past precisely because it is wrong, and the reclaim
|
||||
// tick writes FX into a project REAPER is still rewriting. The extension's other
|
||||
// re-entrancy guards cover OUR pumps; this one covers REAPER's. Consumes nothing, so
|
||||
// the first tick after the load runs as if this one had never been due. Self-lowering
|
||||
// (reaper_plugin_functions.h:1584-1587), and placed after the realtime drive so that
|
||||
// fast path keeps its single-pointer-test shape. See src/shell/view/CLAUDE.md.
|
||||
if (GetCurrentProjectInLoadSave()) return;
|
||||
|
||||
// poll()'s undo/redo-reload and project-switch Load branches call
|
||||
// loadFromProject, replacing g_session.view() wholesale — deferred here while
|
||||
// an applyMode is on the stack (reachable if a pumped message loop re-enters
|
||||
|
||||
Reference in New Issue
Block a user