Fix SWELL drag guard, channel-fork the VST editor window class, dedupe own-module match

Panel drag no longer misfires on SWELL's always-zero wParam; stable/beta VST editors register distinct window classes against their own module instead of colliding on REAPER's; own-module basename matching moves to a tested pure helper.
This commit is contained in:
2026-09-25 14:11:22 -04:00
parent fee941a83d
commit faa513cafb
10 changed files with 103 additions and 38 deletions
+25
View File
@@ -173,6 +173,27 @@ static void testUnknownAndEmptyChainsAreNotPlugin() {
CHECK(!isPluginEditorChain({}));
}
// --- isOwnModulePath -----------------------------------------------------------
static void testOwnModulePathCaseFolds() {
CHECK(isOwnModulePath("C:\\VST3\\reasampler_9000.vst3", "reasampler_9000.vst3"));
CHECK(isOwnModulePath("C:\\VST3\\ReaSampler_9000.VST3", "reasampler_9000.vst3"));
}
static void testOwnModulePathBundlePathForwardAndBackSlash() {
CHECK(isOwnModulePath(
"C:\\VST3\\reasampler_9000.vst3\\Contents\\x86_64-win\\reasampler_9000.vst3",
"reasampler_9000.vst3"));
CHECK(isOwnModulePath(
"C:/VST3/reasampler_9000.vst3/Contents/x86_64-win/reasampler_9000.vst3",
"reasampler_9000.vst3"));
}
static void testOwnModulePathStableAndBetaDoNotMatchEachOther() {
CHECK(!isOwnModulePath("C:\\VST3\\reasampler_9000_beta.vst3", "reasampler_9000.vst3"));
CHECK(!isOwnModulePath("C:\\VST3\\reasampler_9000.vst3", "reasampler_9000_beta.vst3"));
}
int main() {
testHostExecutableIsHost();
testOsModulesAreSystem();
@@ -192,6 +213,10 @@ int main() {
testOtherPluginBesideOwnInstrumentIsStillPlugin();
testUnknownAndEmptyChainsAreNotPlugin();
testOwnModulePathCaseFolds();
testOwnModulePathBundlePathForwardAndBackSlash();
testOwnModulePathStableAndBetaDoNotMatchEachOther();
if (g_fail == 0) std::printf("All tests passed.\n");
return g_fail ? 1 : 0;
}