| 542 | } |
| 543 | |
| 544 | void cFodder::Video_Sleep(cSurface* pSurface, const bool pShrink, const bool pVsync) { |
| 545 | mVideo_Ticked = false; |
| 546 | mVideo_Done = true; |
| 547 | if (!pSurface) { |
| 548 | pSurface = mSurface; |
| 549 | } |
| 550 | |
| 551 | { |
| 552 | std::lock_guard<std::mutex> lock(mSurfaceMtx); |
| 553 | |
| 554 | if (!mStartParams->mDisableVideo) { |
| 555 | if (!pShrink) { |
| 556 | Video_SurfaceRender(false, false, pSurface); |
| 557 | } |
| 558 | else { |
| 559 | Video_SurfaceRender(false, true, pSurface, false); |
| 560 | } |
| 561 | mSurface->Restore(); |
| 562 | } |
| 563 | } |
| 564 | |
| 565 | // If not in vsync mode, then wait for the Amiga 50Hz Interrupt |
| 566 | if (!pVsync) { |
| 567 | while (!mVideo_Ticked) { |
| 568 | SDL_Delay(1); |
| 569 | } |
| 570 | } |
| 571 | |
| 572 | mWindow->Cycle(); |
| 573 | eventsProcess(); |
| 574 | } |
| 575 | |
| 576 | /** |
| 577 | * Interrupt screen redraw |
no test coverage detected