]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
D3D11 OSD refresh fix
authorToni Wilen <twilen@winuae.net>
Sat, 29 Mar 2025 08:17:32 +0000 (10:17 +0200)
committerToni Wilen <twilen@winuae.net>
Sat, 29 Mar 2025 08:17:32 +0000 (10:17 +0200)
od-win32/direct3d11.cpp

index edd06db5d4361c1105e89b5dfd652865d49ed5cd..5475adfc837ed2fbbeba1033cc4ec4a0ec680030 100644 (file)
@@ -4620,6 +4620,16 @@ static bool renderframe(struct d3d11struct *d3d)
 
 static bool TextureShaderClass_Render(struct d3d11struct *d3d, int monid)
 {
+       struct AmigaMonitor *mon = &AMonitors[monid];
+
+       bool rtg = WIN32GFX_IsPicassoScreen(mon);
+       if (((currprefs.leds_on_screen & STATUSLINE_CHIPSET) && !rtg) || ((currprefs.leds_on_screen & STATUSLINE_RTG) && rtg)) {
+               d3d->osd.enabled = true;
+               updateleds(d3d);
+       } else {
+               d3d->osd.enabled = false;
+       }
+
        renderframe(d3d);
 
        RenderSprite(d3d, &d3d->hwsprite, monid);
@@ -5121,7 +5131,6 @@ static uae_u8 *xD3D11_locktexture(int monid, int *pitch, int *width, int *height
 
 static void xD3D11_unlocktexture(int monid, int y_start, int y_end)
 {
-       struct AmigaMonitor *mon = &AMonitors[monid];
        struct d3d11struct *d3d = &d3d11data[monid];
 
        if (!d3d->texturelocked || d3d->invalidmode || !d3d->texture2dstaging) {
@@ -5140,13 +5149,6 @@ static void xD3D11_unlocktexture(int monid, int y_start, int y_end)
                return;
        }
 
-       bool rtg = WIN32GFX_IsPicassoScreen(mon);
-       if (((currprefs.leds_on_screen & STATUSLINE_CHIPSET) && !rtg) || ((currprefs.leds_on_screen & STATUSLINE_RTG) && rtg)) {
-               d3d->osd.enabled = true;
-               updateleds(d3d);
-       } else {
-               d3d->osd.enabled = false;
-       }
        if (y_start < 0 || y_end < 0) {
                d3d->m_deviceContext->CopyResource(d3d->texture2d, d3d->texture2dstaging);
        } else {