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

Method LoadPreset

Source/ModuleSaveDataPanel.cpp:231–240  ·  view source on GitHub ↗

static

Source from the content-addressed store, hash-verified

229
230//static
231void ModuleSaveDataPanel::LoadPreset(IDrawableModule* module, std::string presetFilePath)
232{
233 FileStreamIn presetFile(presetFilePath);
234 presetFile >> ModularSynth::sLoadingFileSaveStateRev;
235 TheSynth->SetIsLoadingState(true);
236 PatchCableSource::sIsLoadingModulePreset = true;
237 module->LoadState(presetFile, module->LoadModuleSaveStateRev(presetFile));
238 PatchCableSource::sIsLoadingModulePreset = true;
239 TheSynth->SetIsLoadingState(false);
240}
241
242void ModuleSaveDataPanel::DrawModule()
243{

Callers

nothing calls this directly

Calls 3

SetIsLoadingStateMethod · 0.80
LoadStateMethod · 0.45

Tested by

no test coverage detected