Fix RenderView not drawing any simulation content

This used to work without the explicit copy because Graphics and Renderer used to share backing buffers.
This commit is contained in:
Tamás Bálint Misius 2023-09-12 19:00:07 +02:00
parent 440dc68b5e
commit fcba9f1f2e
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -161,6 +161,10 @@ void RenderView::OnDraw()
ren->clearScreen();
ren->RenderBegin();
ren->RenderEnd();
for (auto y = 0; y < YRES; ++y)
{
std::copy_n(ren->Data() + ren->Size().X * y, ren->Size().X, g->Data() + g->Size().X * y);
}
}
g->DrawLine({ 0, YRES }, { XRES-1, YRES }, 0xC8C8C8_rgb);
g->DrawLine({ line1, YRES }, { line1, WINDOWH }, 0xC8C8C8_rgb);