From 33c03f1e7a352de95596be9b4c6d2cdfdade028f Mon Sep 17 00:00:00 2001 From: chromaticpipe <127907268+chromaticpipe@users.noreply.github.com> Date: Sat, 24 May 2025 09:02:49 -0500 Subject: [PATCH] Adjust the amplitude of GL underwater effect Also fixed a string truncation warning --- src/hardware/hw_main.c | 2 +- src/sdl/ogl_sdl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 88a2e9a1e..94767ff5d 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -6020,7 +6020,7 @@ static void HWR_DoPostProcessor(player_t *player) if (thiscam->postimg & POSTIMG_WATER) { WAVELENGTH = 5; - AMPLITUDE = 20; + AMPLITUDE = 40; FREQUENCY = 8; } else diff --git a/src/sdl/ogl_sdl.c b/src/sdl/ogl_sdl.c index d4dec6124..c8701506e 100644 --- a/src/sdl/ogl_sdl.c +++ b/src/sdl/ogl_sdl.c @@ -212,7 +212,7 @@ boolean OglSdlSurface(INT32 w, INT32 h) #ifdef USE_FBO_OGL char videodriver[4] = {'S','D','L',0}; if (supportFBO && strstr((const char*)gl_renderer, "NVIDIA") - && (*strncpy(videodriver, SDL_GetCurrentVideoDriver(), 4) != '\0') + && (*strncpy(videodriver, SDL_GetCurrentVideoDriver(), sizeof(videodriver)-1) != '\0') && (strncasecmp("x11",videodriver,4) == 0)) xwaylandcrap = true; #endif -- 2.54.0