ui: Blank screen when VGA SCREEN_OFF is set

This commit is contained in:
mborgerson 2023-06-14 03:36:47 -07:00 committed by GitHub
parent af3f832fd7
commit 129c48dd6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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;

View File

@ -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)