fix(instrument_drop_win): UTF-8 temp path, PID collision guard, embed-strip excluded from drop hotspot

This commit is contained in:
2026-07-28 06:37:42 -04:00
parent b4dd6dc9f1
commit 66f2e402b0
4 changed files with 78 additions and 25 deletions
+15
View File
@@ -218,6 +218,20 @@ static void testNonFxSurfacesAreNotHotspot() {
CHECK(!infoNamesFxHotspot("envcp")); // envelope control panel — a track thing, not FX
}
// The embed-strip sub-element is NOT a hotspot. "tcp.fxembed" / "mcp.fxembed" is the surface
// where a ReaSampler 9000 instance draws inline in the TCP/MCP via IReaperUIEmbedInterface.
// Dropping a card there must NOT add a SECOND instance on top of the existing embed — the
// drop should be ignored (no instrument drop), even though the token starts with "tcp.fx".
// This documents the explicit exclusion in infoNamesFxHotspot and would catch a regression if
// the exclude guard were accidentally removed.
static void testEmbedStripIsNotHotspot() {
CHECK(!infoNamesFxHotspot("tcp.fxembed")); // TCP embed strip — existing instance's surface
CHECK(!infoNamesFxHotspot("mcp.fxembed")); // MCP embed strip — existing instance's surface
// With hypothetically appended info (SDK "may append") — still excluded.
CHECK(!infoNamesFxHotspot("tcp.fxembed.1"));
CHECK(!infoNamesFxHotspot("mcp.fxembed extra"));
}
int main() {
testClassIdHexPinnedPerChannel();
testPresetRoundTripsThroughInstrumentReader();
@@ -230,6 +244,7 @@ int main() {
testTcpMcpFxFamilyIsHotspot();
testFxWindowStillHotspot();
testNonFxSurfacesAreNotHotspot();
testEmbedStripIsNotHotspot();
if (g_fail == 0) std::printf("All tests passed.\n");
return g_fail ? 1 : 0;