Skip to content

Commit

Permalink
Merge pull request #75769 from lyuma/msvc_node_debug_fix
Browse files Browse the repository at this point in the history
Fix libwebp Node struct shadowing Godot's Node class in MSVC debugger
  • Loading branch information
akien-mga committed May 19, 2023
2 parents 9b1b50f + b3a83b7 commit b4584c0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions thirdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,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

Expand Down
16 changes: 16 additions & 0 deletions thirdparty/libwebp/godot-node-debug-fix.patch
Original file line number Diff line number Diff line change
@@ -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 changes: 5 additions & 0 deletions thirdparty/libwebp/src/enc/quant_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b4584c0

Please sign in to comment.