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

Method LoadOldControl

Source/Snapshots.cpp:980–1014  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

978}
979
980bool Snapshots::LoadOldControl(FileStreamIn& in, std::string& oldName)
981{
982 if (mLoadRev < 2)
983 {
984 if (oldName == "preset")
985 {
986 //load from int slider
987 int intSliderRev;
988 in >> intSliderRev;
989 in >> mCurrentSnapshot;
990 int dummy;
991 if (intSliderRev >= 1)
992 {
993 in >> dummy;
994 in >> dummy;
995 }
996 return true;
997 }
998 }
999 if (mLoadRev < 4)
1000 {
1001 if (oldName == "auto-store on switch")
1002 {
1003 //load from checkbox
1004 int checkboxSliderRev;
1005 in >> checkboxSliderRev;
1006 float var;
1007 in >> var;
1008 mAutoStoreOnSwitch = var > 0.5f;
1009 mModuleSaveData.SetBool("auto_store_on_switch", mAutoStoreOnSwitch);
1010 return true;
1011 }
1012 }
1013 return false;
1014}
1015
1016std::vector<IUIControl*> Snapshots::ControlsToNotSetDuringLoadState() const
1017{

Callers

nothing calls this directly

Calls 1

SetBoolMethod · 0.80

Tested by

no test coverage detected