Browse Source

Fix Node class in MSVC debugger for dev_build

(cherry picked from commit b3a83b7c4eb633f74bfa1c21a859af15057b6731)
Lyuma 2 năm trước cách đây
mục cha
commit
e9ee7bdc9b

+ 2 - 0
thirdparty/README.md

@@ -362,6 +362,8 @@ Files extracted from upstream source:
 - `src/` and `sharpyuv/` except from: `.am`, `.rc` and `.in` files
 - `AUTHORS`, `COPYING`, `PATENTS`
 
+Patch `godot-node-debug-fix.patch` workarounds shadowing of godot's Node class in the MSVC debugger.
+
 
 ## mbedtls
 

+ 16 - 0
thirdparty/libwebp/godot-node-debug-fix.patch

@@ -0,0 +1,16 @@
+diff --git a/thirdparty/libwebp/src/enc/quant_enc.c b/thirdparty/libwebp/src/enc/quant_enc.c
+index 6d8202d277..8f9a3c8668 100644
+--- a/src/enc/quant_enc.c
++++ b/src/enc/quant_enc.c
+@@ -556,6 +556,11 @@ static void AddScore(VP8ModeScore* WEBP_RESTRICT const dst,
+ //------------------------------------------------------------------------------
+ // Performs trellis-optimized quantization.
+ 
++// -- GODOT start --
++// Prevents Visual Studio debugger from using this Node struct in place of the Godot Node class.
++#define Node Node_libwebp_quant
++// -- GODOT end --
++
+ // Trellis node
+ typedef struct {
+   int8_t prev;            // best previous node

+ 5 - 0
thirdparty/libwebp/src/enc/quant_enc.c

@@ -556,6 +556,11 @@ static void AddScore(VP8ModeScore* WEBP_RESTRICT const dst,
 //------------------------------------------------------------------------------
 // Performs trellis-optimized quantization.
 
+// -- GODOT start --
+// Prevents Visual Studio debugger from using this Node struct in place of the Godot Node class.
+#define Node Node_libwebp_quant
+// -- GODOT end --
+
 // Trellis node
 typedef struct {
   int8_t prev;            // best previous node