From be3d73cc6bcca9c4becaa3a3144b9d6895919e49 Mon Sep 17 00:00:00 2001 From: Petr Bartos Date: Tue, 12 Nov 2024 21:20:42 +0100 Subject: [PATCH] Comfort vignette fix --- Projects/Android/jni/OpenJK/code/cgame/cg_draw.cpp | 5 +++++ Projects/Android/jni/OpenJK/codeJK2/cgame/cg_draw.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Projects/Android/jni/OpenJK/code/cgame/cg_draw.cpp b/Projects/Android/jni/OpenJK/code/cgame/cg_draw.cpp index d91edbc..4c0da2f 100644 --- a/Projects/Android/jni/OpenJK/code/cgame/cg_draw.cpp +++ b/Projects/Android/jni/OpenJK/code/cgame/cg_draw.cpp @@ -4180,6 +4180,9 @@ static void CG_DrawVignette( bool force ) vec4_t black = {0.0, 0.0, 0.0, 1}; cgi_R_SetColor( black ); + int drawingHUDOrid = cg.drawingHUD; + cg.drawingHUD = CG_HUD_ZOOM; + // sides cgi_R_DrawStretchPic( 0, 0, x, screenHeight, 0, 0, 1, 1, cgs.media.whiteShader ); cgi_R_DrawStretchPic( screenWidth - x, 0, x, screenHeight, 0, 0, 1, 1, cgs.media.whiteShader ); @@ -4189,6 +4192,8 @@ static void CG_DrawVignette( bool force ) // vignette cgi_R_DrawStretchPic( x, y, w, h, 0, 0, 1, 1, cgs.media.vignetteShader ); + cg.drawingHUD = drawingHUDOrid; + cgi_R_SetColor( NULL ); } } diff --git a/Projects/Android/jni/OpenJK/codeJK2/cgame/cg_draw.cpp b/Projects/Android/jni/OpenJK/codeJK2/cgame/cg_draw.cpp index f497d37..012c256 100644 --- a/Projects/Android/jni/OpenJK/codeJK2/cgame/cg_draw.cpp +++ b/Projects/Android/jni/OpenJK/codeJK2/cgame/cg_draw.cpp @@ -2663,6 +2663,9 @@ static void CG_DrawVignette( void ) vec4_t black = {0.0, 0.0, 0.0, 1}; cgi_R_SetColor( black ); + int drawingHUDOrid = cg.drawingHUD; + cg.drawingHUD = CG_HUD_ZOOM; + // sides cgi_R_DrawStretchPic( 0, 0, x, screenHeight, 0, 0, 1, 1, cgs.media.whiteShader ); cgi_R_DrawStretchPic( screenWidth - x, 0, x, screenHeight, 0, 0, 1, 1, cgs.media.whiteShader ); @@ -2672,6 +2675,8 @@ static void CG_DrawVignette( void ) // vignette cgi_R_DrawStretchPic( x, y, w, h, 0, 0, 1, 1, cgs.media.vignetteShader ); + cg.drawingHUD = drawingHUDOrid; + cgi_R_SetColor( NULL ); } }