| 703 | }; |
| 704 | |
| 705 | void CGraphics_Threaded::ScreenshotDirect(bool *pSwapped) |
| 706 | { |
| 707 | if(!m_DoScreenshot) |
| 708 | return; |
| 709 | m_DoScreenshot = false; |
| 710 | if(!WindowActive()) |
| 711 | return; |
| 712 | |
| 713 | CImageInfo Image; |
| 714 | |
| 715 | CCommandBuffer::SCommand_TrySwapAndScreenshot Cmd; |
| 716 | Cmd.m_pImage = &Image; |
| 717 | Cmd.m_pSwapped = pSwapped; |
| 718 | AddCmd(Cmd); |
| 719 | |
| 720 | KickCommandBuffer(); |
| 721 | WaitForIdle(); |
| 722 | |
| 723 | if(Image.m_pData) |
| 724 | { |
| 725 | m_pEngine->AddJob(std::make_shared<CScreenshotSaveJob>(m_pStorage, m_aScreenshotName, std::move(Image))); |
| 726 | } |
| 727 | } |
| 728 | |
| 729 | void CGraphics_Threaded::TextureSet(CTextureHandle TextureId) |
| 730 | { |