Files
MINGW-packages/mingw-w64-python-pygame/002-camera-extension-fixes.patch
2022-11-11 21:59:31 +08:00

33 lines
857 B
Diff

diff --git a/src_c/camera.h b/src_c/camera.h
index 3079a9a3..4ccd1a4d 100644
--- a/src_c/camera.h
+++ b/src_c/camera.h
@@ -50,6 +50,11 @@
#if defined(__WIN32__)
#define PYGAME_WINDOWS_CAMERA 1
+#ifdef __MINGW32__
+#undef WINVER
+#define WINVER _WIN32_WINNT_WINBLUE
+#endif
+
#include <mfapi.h>
#include <mfobjects.h>
#include <mfidl.h>
diff --git a/src_c/camera_windows.c b/src_c/camera_windows.c
index 407ecca7..fc5378f5 100644
--- a/src_c/camera_windows.c
+++ b/src_c/camera_windows.c
@@ -37,6 +37,11 @@
#include "_camera.h"
#include "pgcompat.h"
+#ifdef __MINGW32__
+#include <initguid.h>
+DEFINE_GUID(CLSID_VideoProcessorMFT, 0x88753b26, 0x5b24, 0x49bd, 0xb2,0xe7,0xc,0x44,0x5c,0x78, 0xc9,0x82);
+#endif
+
/*these are already included in camera.h, but having them here
* makes all the types be recognized by VS code */
#include <mfapi.h>