MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / LoadState

Method LoadState

Source/Push2Control.cpp:337–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337void Push2Control::LoadState(FileStreamIn& in, int rev)
338{
339 IDrawableModule::LoadState(in, rev);
340
341 if (!ModuleContainer::DoesModuleHaveMoreSaveData(in))
342 return; //this was saved before we added versioning, bail out
343
344 LoadStateValidate(rev >= GetModuleSaveStateRev());
345
346 int numBookmarks;
347 in >> numBookmarks;
348 mBookmarkSlots.resize(numBookmarks);
349 for (int i = 0; i < numBookmarks; ++i)
350 {
351 std::string path;
352 in >> path;
353 if (path != "")
354 mBookmarkSlots[i] = TheSynth->FindModule(path);
355 else
356 mBookmarkSlots[i] = nullptr;
357 }
358
359 int numFaves;
360 in >> numFaves;
361 mFavoriteControls.resize(numFaves);
362 for (int i = 0; i < numFaves; ++i)
363 {
364 std::string path;
365 in >> path;
366 if (path != "")
367 mFavoriteControls[i] = TheSynth->FindUIControl(path);
368 else
369 mFavoriteControls[i] = nullptr;
370 }
371}
372
373//static
374void Push2Control::CreateStaticFramebuffer()

Callers

nothing calls this directly

Calls 4

LoadStateValidateFunction · 0.85
resizeMethod · 0.80
FindModuleMethod · 0.45
FindUIControlMethod · 0.45

Tested by

no test coverage detected