zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 0765a340717ca94394a3f59e2606bded47eac064
parent 5aa8901dc6a8f0193f5d55320ebb65873a683798
Author: fundamental <mark.d.mccurry@gmail.com>
Date:   Wed, 26 Jul 2017 15:20:44 -0400

Add version fetch in XMLWrapper:putXMLData()

Extracts the version from a cstring version of the xml data
(in addition to file based options).
This fixes the upgrade path for filters in the 3.0.2 release as
previously the xml file versions were incorrectly identified in a
few cases.
Most notably loading saves from VST hosts was affected resulting in
filters which were at their default cutoff/gain/q/tracking values.

Diffstat:
Msrc/Misc/XMLwrapper.cpp | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/Misc/XMLwrapper.cpp b/src/Misc/XMLwrapper.cpp @@ -397,6 +397,12 @@ bool XMLwrapper::putXMLdata(const char *xmldata) if(root == NULL) return false; + //fetch version information + _fileversion.set_major(stringTo<int>(mxmlElementGetAttr(root, "version-major"))); + _fileversion.set_minor(stringTo<int>(mxmlElementGetAttr(root, "version-minor"))); + _fileversion.set_revision( + stringTo<int>(mxmlElementGetAttr(root, "version-revision"))); + return true; }