From 899ec9f9f4dccaadc6272c6f2768bbe9ce0246b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Jos=C3=A9=20Garc=C3=ADa=20Garc=C3=ADa?= Date: Sun, 3 Jan 2021 17:31:18 +0100 Subject: [PATCH] [VITA] Disable depth test if needed --- gfx/drivers/gl1.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gfx/drivers/gl1.c b/gfx/drivers/gl1.c index 9f7f38877f..263a2e6894 100644 --- a/gfx/drivers/gl1.c +++ b/gfx/drivers/gl1.c @@ -868,9 +868,15 @@ static bool gl1_gfx_frame(void *data, const void *frame, do_swap = true; #ifdef VITA glUseProgram(0); - glDisable(GL_DEPTH_TEST); + bool enabled = glIsEnabled(GL_DEPTH_TEST); + if(enabled) + glDisable(GL_DEPTH_TEST); #endif menu_driver_frame(menu_is_alive, video_info); +#ifdef VITA + if(enabled) + glEnable(GL_DEPTH_TEST); +#endif } else #endif