From: <sv...@op...> - 2024-07-03 17:09:52
|
Author: sagamusix Date: Wed Jul 3 19:09:44 2024 New Revision: 21126 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21126 Log: Merged revision(s) 21125 from trunk/OpenMPT: [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: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/plugins/PluginManager.cpp Modified: branches/OpenMPT-1.31/soundlib/plugins/PluginManager.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/plugins/PluginManager.cpp Wed Jul 3 19:09:17 2024 (r21125) +++ branches/OpenMPT-1.31/soundlib/plugins/PluginManager.cpp Wed Jul 3 19:09:44 2024 (r21126) @@ -779,7 +779,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; |