fix: Undefine Windows macros to prevent conflicts with protobuf generated code

- Added preprocessor directives to undefine the DWORD and ERROR macros on Windows, ensuring compatibility with protobuf generated code in imgui_test_harness_service.h and gui_automation_client.h.
- This change prevents potential compilation issues when using gRPC and protobuf in a Windows environment.
This commit is contained in:
scawful
2025-10-09 23:33:47 -04:00
parent d371dbc2d7
commit 3f2ef7f523
2 changed files with 19 additions and 0 deletions

View File

@@ -17,6 +17,15 @@
#include <vector>
#ifdef YAZE_WITH_GRPC
// Undefine Windows macros that conflict with protobuf generated code
#ifdef _WIN32
#ifdef DWORD
#undef DWORD
#endif
#ifdef ERROR
#undef ERROR
#endif
#endif // _WIN32
#include <grpcpp/grpcpp.h>
#include "protos/imgui_test_harness.grpc.pb.h"
#endif