mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-14 00:02:10 +02:00
Work around incorrect wchar_t text serialization
`std::char_traits<wchar_t>::length()` would return the wrong length for a wide string under Wine, and thus also for `String128`. This would cause parts of the strings to get cut off. As a workaround we'll just serialize the entire container including all null bytes at the end.
This commit is contained in:
@@ -141,8 +141,8 @@ namespace Vst {
|
||||
template <typename S>
|
||||
void serialize(S& s, Steinberg::Vst::KeyswitchInfo& info) {
|
||||
s.value4b(info.typeId);
|
||||
s.text2b(info.title);
|
||||
s.text2b(info.shortTitle);
|
||||
s.container2b(info.title);
|
||||
s.container2b(info.shortTitle);
|
||||
s.value4b(info.keyswitchMin);
|
||||
s.value4b(info.keyswitchMax);
|
||||
s.value4b(info.keyRemapped);
|
||||
|
||||
@@ -242,9 +242,9 @@ namespace Vst {
|
||||
template <typename S>
|
||||
void serialize(S& s, NoteExpressionTypeInfo& info) {
|
||||
s.value4b(info.typeId);
|
||||
s.text2b(info.title);
|
||||
s.text2b(info.shortTitle);
|
||||
s.text2b(info.units);
|
||||
s.container2b(info.title);
|
||||
s.container2b(info.shortTitle);
|
||||
s.container2b(info.units);
|
||||
s.value4b(info.unitId);
|
||||
s.object(info.valueDesc);
|
||||
s.value4b(info.associatedParameterId);
|
||||
|
||||
@@ -449,14 +449,14 @@ template <typename S>
|
||||
void serialize(S& s, UnitInfo& info) {
|
||||
s.value4b(info.id);
|
||||
s.value4b(info.parentUnitId);
|
||||
s.text2b(info.name);
|
||||
s.container2b(info.name);
|
||||
s.value4b(info.programListId);
|
||||
}
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s, ProgramListInfo& info) {
|
||||
s.value4b(info.id);
|
||||
s.text2b(info.name);
|
||||
s.container2b(info.name);
|
||||
s.value4b(info.programCount);
|
||||
}
|
||||
} // namespace Vst
|
||||
|
||||
Reference in New Issue
Block a user