]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
D3D11 mode OSD led crash fix.
authorToni Wilen <twilen@winuae.net>
Sun, 25 Jul 2021 18:26:37 +0000 (21:26 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 25 Jul 2021 18:26:37 +0000 (21:26 +0300)
od-win32/direct3d11.cpp

index bf32dd8d3feea4c57f847022ad13b5d01552be2d..0b91e5f2d6059c1d33d76197067e0dd447843b71 100644 (file)
@@ -1596,13 +1596,13 @@ static void updateleds(struct d3d11struct *d3d)
                write_log(_T("Led Map failed %08x\n"), hr);
                return;
        }
-       for (int y = 0; y < TD_TOTAL_HEIGHT * d3d->statusbar_vx; y++) {
+       for (int y = 0; y < d3d->osd.height; y++) {
                uae_u8 *buf = (uae_u8*)map.pData + y * map.RowPitch;
                statusline_single_erase(d3d - d3d11data, buf, 32 / 8, y, d3d->ledwidth);
        }
        statusline_render(d3d - d3d11data, (uae_u8*)map.pData, 32 / 8, map.RowPitch, d3d->ledwidth, d3d->ledheight, rc, gc, bc, a);
 
-       for (int y = 0; y < TD_TOTAL_HEIGHT * d3d->statusbar_vx; y++) {
+       for (int y = 0; y < d3d->osd.height; y++) {
                uae_u8 *buf = (uae_u8*)map.pData + y * map.RowPitch;
                draw_status_line_single(d3d - d3d11data, buf, 32 / 8, y, d3d->ledwidth, rc, gc, bc, a);
        }