| 387 | } |
| 388 | |
| 389 | void RadioSequencer::LoadState(FileStreamIn& in, int rev) |
| 390 | { |
| 391 | mLoadRev = rev; |
| 392 | |
| 393 | if (ModularSynth::sLoadingFileSaveStateRev == 422) |
| 394 | { |
| 395 | in >> mLoadRev; |
| 396 | LoadStateValidate(mLoadRev <= GetModuleSaveStateRev()); |
| 397 | } |
| 398 | |
| 399 | IDrawableModule::LoadState(in, rev); |
| 400 | |
| 401 | if (ModularSynth::sLoadingFileSaveStateRev <= 421) |
| 402 | { |
| 403 | in >> mLoadRev; |
| 404 | LoadStateValidate(mLoadRev <= GetModuleSaveStateRev()); |
| 405 | } |
| 406 | |
| 407 | if (rev <= 1) |
| 408 | { |
| 409 | int size; |
| 410 | in >> size; |
| 411 | mControlCables.resize(size); |
| 412 | for (auto cable : mControlCables) |
| 413 | { |
| 414 | std::string path; |
| 415 | in >> path; |
| 416 | } |
| 417 | } |
| 418 | |
| 419 | mGrid->LoadState(in); |
| 420 | |
| 421 | if (mLoadRev >= 1) |
| 422 | { |
| 423 | float width, height; |
| 424 | in >> width; |
| 425 | in >> height; |
| 426 | mGrid->SetDimensions(width, height); |
| 427 | } |
| 428 | |
| 429 | if (mLoadRev == 0) |
| 430 | { |
| 431 | //port old data |
| 432 | float len = 0; |
| 433 | if (mOldLengthStr == "4") |
| 434 | len = 4; |
| 435 | if (mOldLengthStr == "6") |
| 436 | len = 6; |
| 437 | if (mOldLengthStr == "8") |
| 438 | len = 8; |
| 439 | if (mOldLengthStr == "16") |
| 440 | len = 16; |
| 441 | if (mOldLengthStr == "32") |
| 442 | len = 32; |
| 443 | if (mOldLengthStr == "64") |
| 444 | len = 64; |
| 445 | if (mOldLengthStr == "128") |
| 446 | len = 128; |
nothing calls this directly
no test coverage detected