[Scummvm-git-logs] scummvm master -> 7794de5e5e5976aba3c63c08bf885e14d57b4e8d
lephilousophe
noreply at scummvm.org
Sat Jun 1 11:42:05 UTC 2024
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a31ea07f82 Revert "GRAPHICS: OPENGL: Disable usage of sscanf_s"
7794de5e5e GRAPHICS: OPENGL: Allow sscanf_s for GLAD
Commit: a31ea07f82f8ec67774f510791e75dfa95ca2430
https://github.com/scummvm/scummvm/commit/a31ea07f82f8ec67774f510791e75dfa95ca2430
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2024-06-01T13:42:01+02:00
Commit Message:
Revert "GRAPHICS: OPENGL: Disable usage of sscanf_s"
This reverts commit 5040e1129dc62356214fe92b606d325f0d3d6919.
Instead of modifying an autogenerated file, patch around it.
Changed paths:
graphics/opengl/glad.h
diff --git a/graphics/opengl/glad.h b/graphics/opengl/glad.h
index 8c8f4775eda..dc801d6bfa0 100644
--- a/graphics/opengl/glad.h
+++ b/graphics/opengl/glad.h
@@ -7750,11 +7750,11 @@ GLAD_API_CALL int gladLoadGLES2( GLADloadfunc load);
#ifndef GLAD_IMPL_UTIL_C_
#define GLAD_IMPL_UTIL_C_
-//#ifdef _MSC_VER
-//#define GLAD_IMPL_UTIL_SSCANF sscanf_s
-//#else
+#ifdef _MSC_VER
+#define GLAD_IMPL_UTIL_SSCANF sscanf_s
+#else
#define GLAD_IMPL_UTIL_SSCANF sscanf
-//#endif
+#endif
#endif /* GLAD_IMPL_UTIL_C_ */
@@ -13173,7 +13173,7 @@ int gladLoadGLES2( GLADloadfunc load) {
-
+
#ifdef __cplusplus
@@ -13181,3 +13181,4 @@ int gladLoadGLES2( GLADloadfunc load) {
#endif
#endif /* GLAD_GL_IMPLEMENTATION */
+
Commit: 7794de5e5e5976aba3c63c08bf885e14d57b4e8d
https://github.com/scummvm/scummvm/commit/7794de5e5e5976aba3c63c08bf885e14d57b4e8d
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2024-06-01T13:42:01+02:00
Commit Message:
GRAPHICS: OPENGL: Allow sscanf_s for GLAD
It is properly guarded so it won't bring any portability problem and the
file is autogenerated so this avoids to patch the file.
Changed paths:
graphics/opengl/context.cpp
diff --git a/graphics/opengl/context.cpp b/graphics/opengl/context.cpp
index 75cf55038e4..16b100e4f82 100644
--- a/graphics/opengl/context.cpp
+++ b/graphics/opengl/context.cpp
@@ -20,6 +20,12 @@
*/
#define GLAD_GL_IMPLEMENTATION
+// sscanf_s is used by glad on MSVC only
+// we can't know before c=config.h is loaded that GLAD will be used
+// but at this time it will be too late to allow sscanf_s
+#ifdef _MSC_VER
+#define FORBIDDEN_SYMBOL_EXCEPTION_sscanf_s
+#endif
#include "graphics/opengl/context.h"
More information about the Scummvm-git-logs
mailing list