From 420efd2c6ed8c35a811b148327bf49e82400c715 Mon Sep 17 00:00:00 2001 From: Patoke Date: Mon, 2 Mar 2026 01:43:10 -0300 Subject: [PATCH 1/2] fix: compiling would fail in the game project because of __snprintf --- Windows_Libs/Dev/Render/RendererTexture.cpp | 2 +- Windows_Libs/Dev/Render/libpng/pnglibconf.h | 2 +- Windows_Libs/Dev/Render/zlib/zconf.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Windows_Libs/Dev/Render/RendererTexture.cpp b/Windows_Libs/Dev/Render/RendererTexture.cpp index b74dcaf..40c5925 100644 --- a/Windows_Libs/Dev/Render/RendererTexture.cpp +++ b/Windows_Libs/Dev/Render/RendererTexture.cpp @@ -74,7 +74,7 @@ void Renderer::TextureSetParam(int param, int value) } break; case GL_TEXTURE_WRAP_T: - case 5: + case 5: // GL_TEXTURE_WRAP_R, but this renderer only supports 2D textures, so treat it as GL_TEXTURE_WRAP_T texture.samplerParams &= ~2u; if (value == 0) { diff --git a/Windows_Libs/Dev/Render/libpng/pnglibconf.h b/Windows_Libs/Dev/Render/libpng/pnglibconf.h index 1e21b37..e12c895 100644 --- a/Windows_Libs/Dev/Render/libpng/pnglibconf.h +++ b/Windows_Libs/Dev/Render/libpng/pnglibconf.h @@ -25,7 +25,7 @@ #define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED #define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED #define PNG_COLORSPACE_SUPPORTED -#define PNG_CONSOLE_IO_SUPPORTED +//#define PNG_CONSOLE_IO_SUPPORTED #define PNG_CONVERT_tIME_SUPPORTED /*#undef PNG_DISABLE_ADLER32_CHECK_SUPPORTED*/ #define PNG_EASY_ACCESS_SUPPORTED diff --git a/Windows_Libs/Dev/Render/zlib/zconf.h b/Windows_Libs/Dev/Render/zlib/zconf.h index 828ca61..40c02e7 100644 --- a/Windows_Libs/Dev/Render/zlib/zconf.h +++ b/Windows_Libs/Dev/Render/zlib/zconf.h @@ -8,6 +8,8 @@ #ifndef ZCONF_H #define ZCONF_H +#define NO_snprintf + /* * If you *really* need a unique prefix for all types and library functions, * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. From 5b1270586b5b10257bde611425fcd451843f9478 Mon Sep 17 00:00:00 2001 From: Patoke Date: Mon, 2 Mar 2026 05:02:50 -0300 Subject: [PATCH 2/2] fix: performance difference with original debug binaries caused by compiler flags mismatch (possibly fixes #7) --- Windows_Libs/Dev/Input/Input.vcxproj | 4 +++- Windows_Libs/Dev/Profile/Profile.vcxproj | 4 +++- Windows_Libs/Dev/Render/Render.vcxproj | 4 +++- Windows_Libs/Dev/Render/RendererCore.cpp | 2 +- Windows_Libs/Dev/Storage/Storage.vcxproj | 4 +++- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Windows_Libs/Dev/Input/Input.vcxproj b/Windows_Libs/Dev/Input/Input.vcxproj index 9c1f194..ad24d91 100644 --- a/Windows_Libs/Dev/Input/Input.vcxproj +++ b/Windows_Libs/Dev/Input/Input.vcxproj @@ -43,7 +43,7 @@ StaticLibrary true - v145 + v110 Unicode @@ -123,6 +123,8 @@ stdafx.h true MultiThreadedDebug + Default + true diff --git a/Windows_Libs/Dev/Profile/Profile.vcxproj b/Windows_Libs/Dev/Profile/Profile.vcxproj index ed58ddb..11e6d42 100644 --- a/Windows_Libs/Dev/Profile/Profile.vcxproj +++ b/Windows_Libs/Dev/Profile/Profile.vcxproj @@ -43,7 +43,7 @@ StaticLibrary true - v145 + v110 Unicode @@ -123,6 +123,8 @@ true stdafx.h MultiThreadedDebug + Default + true diff --git a/Windows_Libs/Dev/Render/Render.vcxproj b/Windows_Libs/Dev/Render/Render.vcxproj index aab379d..f0127eb 100644 --- a/Windows_Libs/Dev/Render/Render.vcxproj +++ b/Windows_Libs/Dev/Render/Render.vcxproj @@ -43,7 +43,7 @@ StaticLibrary true - v145 + v110 Unicode @@ -124,6 +124,8 @@ stdafx.h MultiThreadedDebug libpng\;zlib\;%(AdditionalIncludeDirectories) + Default + true diff --git a/Windows_Libs/Dev/Render/RendererCore.cpp b/Windows_Libs/Dev/Render/RendererCore.cpp index 1cd0b9e..c472f74 100644 --- a/Windows_Libs/Dev/Render/RendererCore.cpp +++ b/Windows_Libs/Dev/Render/RendererCore.cpp @@ -699,7 +699,7 @@ void Renderer::UpdateGamma(unsigned short) {} Renderer::Context &Renderer::getContext() { - return *static_cast(TlsGetValue(Renderer::tlsIdx)); + return *reinterpret_cast(TlsGetValue(Renderer::tlsIdx)); } void Renderer::CaptureThumbnail(ImageFileBuffer *pngOut) diff --git a/Windows_Libs/Dev/Storage/Storage.vcxproj b/Windows_Libs/Dev/Storage/Storage.vcxproj index 4b28723..93cd0c8 100644 --- a/Windows_Libs/Dev/Storage/Storage.vcxproj +++ b/Windows_Libs/Dev/Storage/Storage.vcxproj @@ -42,7 +42,7 @@ StaticLibrary true - v145 + v110 Unicode @@ -122,6 +122,8 @@ true stdafx.h MultiThreadedDebug + Default + true