diff --git a/hw/xbox/nv2a/nv2a.h b/hw/xbox/nv2a/nv2a.h index 9e3b0206f6f..35b63749e46 100644 --- a/hw/xbox/nv2a/nv2a.h +++ b/hw/xbox/nv2a/nv2a.h @@ -27,5 +27,6 @@ int nv2a_get_framebuffer_surface(void); void nv2a_set_surface_scale_factor(unsigned int scale); unsigned int nv2a_get_surface_scale_factor(void); const uint8_t *nv2a_get_dac_palette(void); +int nv2a_get_screen_off(void); #endif diff --git a/hw/xbox/nv2a/pgraph.c b/hw/xbox/nv2a/pgraph.c index a9bdb1ab671..f40fcaf6899 100644 --- a/hw/xbox/nv2a/pgraph.c +++ b/hw/xbox/nv2a/pgraph.c @@ -5350,6 +5350,11 @@ const uint8_t *nv2a_get_dac_palette(void) return g_nv2a->puserdac.palette; } +int nv2a_get_screen_off(void) +{ + return g_nv2a->vga.sr[VGA_SEQ_CLOCK_MODE] & VGA_SR01_SCREEN_OFF; +} + int nv2a_get_framebuffer_surface(void) { NV2AState *d = g_nv2a; diff --git a/ui/xui/gl-helpers.cc b/ui/xui/gl-helpers.cc index 996f2637267..12e7eb60778 100644 --- a/ui/xui/gl-helpers.cc +++ b/ui/xui/gl-helpers.cc @@ -700,7 +700,10 @@ void RenderFramebuffer(GLint tex, int width, int height, bool flip, float scale[ glClearColor(0, 0, 0, 0); glClear(GL_COLOR_BUFFER_BIT); - glDrawElements(GL_TRIANGLE_FAN, 4, GL_UNSIGNED_INT, NULL); + + if (!nv2a_get_screen_off()) { + glDrawElements(GL_TRIANGLE_FAN, 4, GL_UNSIGNED_INT, NULL); + } } void RenderFramebuffer(GLint tex, int width, int height, bool flip)