MCPcopy Create free account
hub / github.com/ddnet/ddnet / Swap

Method Swap

src/engine/client/graphics_threaded.cpp:2795–2813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2793}
2794
2795void CGraphics_Threaded::Swap()
2796{
2797 bool Swapped = false;
2798 ScreenshotDirect(&Swapped);
2799 ReadPixelDirect(&Swapped);
2800
2801 if(!Swapped)
2802 {
2803 CCommandBuffer::SCommand_Swap Cmd;
2804 AddCmd(Cmd);
2805 }
2806
2807 KickCommandBuffer();
2808 // TODO: Remove when https://github.com/libsdl-org/SDL/issues/5203 is fixed
2809#ifdef CONF_PLATFORM_MACOS
2810 if(str_find(GetVersionString(), "Metal"))
2811 WaitForIdle();
2812#endif
2813}
2814
2815bool CGraphics_Threaded::SetVSync(bool State)
2816{

Callers 3

RenderShutdownMessageMethod · 0.80
RunMethod · 0.80
UpdateAndSwapMethod · 0.80

Calls 1

str_findFunction · 0.85

Tested by

no test coverage detected