First,you should use the source build UE which can be downloaded from GitHub.
Second,open the file [UnrealEngine]\Engine\Source\Runtime\D3D12RHI\Private\D3D12Viewport.cpp,find the line writting the code “PreferredPixelFormat = GetDefaultBackBufferPixelFormat();” which directly courses the problen.Now #include <Windows.h> at the top of the cpp,and just before the line coursing the problem insert the code “Sleep(8);”(the value to Sleep is up to you),and build the UE5 project.Now the problem is solved.
1 Like