Skip to content

Commit 13fbc26

Browse files
committed
Fix compilation with WIN32_LEAN_AND_MEAN and use it for hid.c
1 parent a758717 commit 13fbc26

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

windows/hid.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
extern "C" {
3131
#endif
3232

33+
#ifndef WIN32_LEAN_AND_MEAN
34+
/* Reduces the overhead from windows.h */
35+
#define WIN32_LEAN_AND_MEAN
36+
#endif
37+
3338
#include "hidapi_winapi.h"
3439

3540
#include <windows.h>

windows/hidapi_cfgmgr32.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
/* This part of the header mimics cfgmgr32.h,
3333
but only what is used by HIDAPI */
3434

35+
#include <ole2.h>
3536
#include <initguid.h>
3637
#include <devpropdef.h>
3738
#include <propkeydef.h>

0 commit comments

Comments
 (0)