From 8362b2cea575d5e444d48326a704664e3a87692d Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Fri, 16 Dec 2022 07:15:47 +0200 Subject: [PATCH] fixed old bugs --- src/3dengfx/src/3dengfx/3denginefx.cpp | 1 + src/3dengfx/src/common/err_msg.c | 6 +++--- src/sumhack.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/3dengfx/src/3dengfx/3denginefx.cpp b/src/3dengfx/src/3dengfx/3denginefx.cpp index 899031c..9861ab1 100644 --- a/src/3dengfx/src/3dengfx/3denginefx.cpp +++ b/src/3dengfx/src/3dengfx/3denginefx.cpp @@ -273,6 +273,7 @@ SysCaps get_system_capabilities() { // fill the SysCaps structure //SysCaps sys_caps; + sys_caps.multitex = (bool)strstr(ext_str, "GL_ARB_multitexture"); sys_caps.load_transpose = (bool)strstr(ext_str, "GL_ARB_transpose_matrix"); sys_caps.gen_mipmaps = (bool)strstr(ext_str, "GL_SGIS_generate_mipmap"); sys_caps.tex_combine_ops = (bool)strstr(ext_str, "GL_ARB_texture_env_combine"); diff --git a/src/3dengfx/src/common/err_msg.c b/src/3dengfx/src/common/err_msg.c index 78ddd63..2c50d49 100644 --- a/src/3dengfx/src/common/err_msg.c +++ b/src/3dengfx/src/common/err_msg.c @@ -106,7 +106,7 @@ void error(const char *str, ...) { strcpy(err_buf, "E: "); va_start(arg_list, str); - vsnprintf(err_buf+3, ERR_BUF_SIZE, str, arg_list); + vsnprintf(err_buf+3, ERR_BUF_SIZE - 3, str, arg_list); va_end(arg_list); if(verbosity > 0) { @@ -127,7 +127,7 @@ void warning(const char *str, ...) { strcpy(err_buf, "W: "); va_start(arg_list, str); - vsnprintf(err_buf+3, ERR_BUF_SIZE, str, arg_list); + vsnprintf(err_buf+3, ERR_BUF_SIZE - 3, str, arg_list); va_end(arg_list); if(verbosity > 1) { @@ -148,7 +148,7 @@ void info(const char *str, ...) { strcpy(err_buf, "I: "); va_start(arg_list, str); - vsnprintf(err_buf+3, ERR_BUF_SIZE, str, arg_list); + vsnprintf(err_buf+3, ERR_BUF_SIZE - 3, str, arg_list); va_end(arg_list); if(verbosity > 2) { diff --git a/src/sumhack.cpp b/src/sumhack.cpp index 75c6fa3..9e2a224 100644 --- a/src/sumhack.cpp +++ b/src/sumhack.cpp @@ -91,7 +91,7 @@ bool init() { SDL_ShowCursor(0); } - fxwt::set_window_title("The Lab Demos :: Summer Hack"); + fxwt::set_window_title("The Lab Demos :: Summer Hack (rebuild)"); fxwt::set_display_handler(update_gfx); fxwt::set_idle_handler(update_gfx); fxwt::set_keyboard_handler(key_handler); -- 1.7.10.4