| 318 | |
| 319 | static int sFrameCount = 0; |
| 320 | void ModularSynth::Poll() |
| 321 | { |
| 322 | if (mFatalError == "") |
| 323 | { |
| 324 | if (!mInitialized && sFrameCount > 3) //let some frames render before blocking for a load |
| 325 | { |
| 326 | mUserPrefsEditor->CreatePrefsFileIfNonexistent(); |
| 327 | |
| 328 | if (!mStartupSaveStateFile.empty()) |
| 329 | LoadState(mStartupSaveStateFile); |
| 330 | else |
| 331 | LoadLayoutFromFile(ofToDataPath(UserPrefs.layout.Get())); |
| 332 | mInitialized = true; |
| 333 | } |
| 334 | |
| 335 | if (mWantReloadInitialLayout) |
| 336 | { |
| 337 | LoadLayoutFromFile(ofToDataPath(UserPrefs.layout.Get())); |
| 338 | mWantReloadInitialLayout = false; |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | mZoomer.Update(); |
| 343 | |
| 344 | if (!mIsLoadingState) |
| 345 | { |
| 346 | for (auto p : mExtraPollers) |
| 347 | p->Poll(); |
| 348 | mUILayerModuleContainer.Poll(); |
| 349 | mModuleContainer.Poll(); |
| 350 | } |
| 351 | |
| 352 | if (mShowLoadStatePopup) |
| 353 | { |
| 354 | mShowLoadStatePopup = false; |
| 355 | LoadStatePopupImp(); |
| 356 | } |
| 357 | |
| 358 | if (mScheduledEnvelopeEditorSpawnDisplay != nullptr) |
| 359 | { |
| 360 | mScheduledEnvelopeEditorSpawnDisplay->SpawnEnvelopeEditor(); |
| 361 | mScheduledEnvelopeEditorSpawnDisplay = nullptr; |
| 362 | } |
| 363 | |
| 364 | { |
| 365 | static MouseCursor sCurrentCursor = MouseCursor::NormalCursor; |
| 366 | MouseCursor desiredCursor; |
| 367 | |
| 368 | if (mIsLoadingState) |
| 369 | { |
| 370 | desiredCursor = MouseCursor::WaitCursor; |
| 371 | } |
| 372 | else if (gHoveredUIControl != nullptr && gHoveredUIControl->IsMouseDown()) |
| 373 | { |
| 374 | if (GetKeyModifiers() == kModifier_Shift) |
| 375 | desiredCursor = MouseCursor::CrosshairCursor; |
| 376 | else if (dynamic_cast<FloatSlider*>(gHoveredUIControl) != nullptr && dynamic_cast<FloatSlider*>(gHoveredUIControl)->GetModulator() != nullptr && dynamic_cast<FloatSlider*>(gHoveredUIControl)->GetModulator()->Active()) |
| 377 | desiredCursor = MouseCursor::UpDownLeftRightResizeCursor; |
nothing calls this directly
no test coverage detected