Merge branch 'sigsegv-fix' into 'master'

Fix SIGSEGV related to GL renderer

See merge request KartKrew/RingRacers!49
This commit is contained in:
Sal 2024-08-22 13:00:12 +00:00
commit 99818671a8
2 changed files with 7 additions and 3 deletions

View file

@ -333,8 +333,10 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p
Surf.PolyColor.s.alpha = softwaretranstogl[V_GetHUDTranslucency(option)];
else if (alphalevel == 12)
Surf.PolyColor.s.alpha = softwaretranstogl_hi[V_GetHUDTranslucency(option)];
else
else if (alphalevel < 10)
Surf.PolyColor.s.alpha = softwaretranstogl[10-alphalevel];
else // alphalevel > 12
return;
HWD.pfnDrawPolygon(&Surf, v, 4, flags|PF_Modulated);
}
@ -487,8 +489,10 @@ void HWR_DrawCroppedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale,
Surf.PolyColor.s.alpha = softwaretranstogl[V_GetHUDTranslucency(option)];
else if (alphalevel == 12)
Surf.PolyColor.s.alpha = softwaretranstogl_hi[V_GetHUDTranslucency(option)];
else
else if (alphalevel < 10)
Surf.PolyColor.s.alpha = softwaretranstogl[10-alphalevel];
else // alphalevel > 12
return;
HWD.pfnDrawPolygon(&Surf, v, 4, flags|PF_Modulated);
}

View file

@ -3835,7 +3835,7 @@ static void K_DrawTypingNotifier(fixed_t x, fixed_t y, player_t *p, INT32 flags)
{
if (p->cmd.flags & TICCMD_TYPING)
{
V_DrawFixedPatch(x, y, FRACUNIT, V_HUDTRANS|V_SPLITSCREEN|flags, kp_talk, NULL);
V_DrawFixedPatch(x, y, FRACUNIT, V_SPLITSCREEN|flags, kp_talk, NULL);
/* spacing closer with the last two looks a better most of the time */
K_DrawTypingDot(x + 3*FRACUNIT, y, 15, p, flags);