From: <sv...@op...> - 2024-07-03 17:09:29
|
Author: sagamusix Date: Wed Jul 3 19:09:17 2024 New Revision: 21125 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21125 Log: [Fix] Since r6066 (OpenMPT 1.26.01.00), VST plugins were only loaded if their primary plugin magic matched the expected value (VstP). However, I have some old files made with OpenMPT 1.17 where the primary plugin magic doesn't match the expected value. Revert this code to match the pre-1.26 behaviour. Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp ============================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Tue Jul 2 19:28:19 2024 (r21124) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Wed Jul 3 19:09:17 2024 (r21125) @@ -781,7 +781,11 @@ } #ifdef MPT_WITH_VST - if(pFound && mixPlugin.Info.dwPluginId1 == Vst::kEffectMagic) + // Note: we don't check if dwPluginId1 matches Vst::kEffectMagic here, even if it should. + // I have an old file I made with OpenMPT 1.17 where the primary plugin ID has an unexpected value. + // No idea how that could happen, apart from some plugin.cache corruption (back then, the IDs were not re-checked + // after instantiating a plugin and the cached plugin ID was blindly written to the module file) + if(pFound) { Vst::AEffect *pEffect = nullptr; HINSTANCE hLibrary = nullptr; |