From 33048db81ab6b99c87a7cfbe83b2f6b8fb6e2802 Mon Sep 17 00:00:00 2001 From: Joshua Peisach Date: Fri, 8 Sep 2023 14:18:44 -0400 Subject: [PATCH] Define WIN32_LEAN_AND_MEAN when importing windows.h This way, when preprocessing, only the relevant windows API structures will be generated. --- LEGO1/dllmain.cpp | 4 ++++ LEGO1/mxcriticalsection.h | 4 ++++ LEGO1/mxdirectdraw.h | 4 ++++ LEGO1/mxioinfo.h | 4 ++++ LEGO1/mxomnicreateparam.h | 4 ++++ LEGO1/mxsemaphore.h | 4 ++++ LEGO1/mxtimer.h | 4 ++++ LEGO1/mxvideoparamflags.h | 4 ++++ 8 files changed, 32 insertions(+) diff --git a/LEGO1/dllmain.cpp b/LEGO1/dllmain.cpp index d4b7168b..1d5472a2 100644 --- a/LEGO1/dllmain.cpp +++ b/LEGO1/dllmain.cpp @@ -1,3 +1,7 @@ +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + #include // OFFSET: LEGO1 0x10091ee0 diff --git a/LEGO1/mxcriticalsection.h b/LEGO1/mxcriticalsection.h index 81d96d37..e3b1274a 100644 --- a/LEGO1/mxcriticalsection.h +++ b/LEGO1/mxcriticalsection.h @@ -1,6 +1,10 @@ #ifndef MXCRITICALSECTION_H #define MXCRITICALSECTION_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + #include class MxCriticalSection diff --git a/LEGO1/mxdirectdraw.h b/LEGO1/mxdirectdraw.h index 3e2c710a..ab91072c 100644 --- a/LEGO1/mxdirectdraw.h +++ b/LEGO1/mxdirectdraw.h @@ -2,6 +2,10 @@ #ifndef MXDIRECTDRAW_H #define MXDIRECTDRAW_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + #include #include diff --git a/LEGO1/mxioinfo.h b/LEGO1/mxioinfo.h index 83da930a..ef737ae0 100644 --- a/LEGO1/mxioinfo.h +++ b/LEGO1/mxioinfo.h @@ -1,6 +1,10 @@ #ifndef MXIOINFO_H #define MXIOINFO_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + #include #include diff --git a/LEGO1/mxomnicreateparam.h b/LEGO1/mxomnicreateparam.h index 31dcd447..f5a5195c 100644 --- a/LEGO1/mxomnicreateparam.h +++ b/LEGO1/mxomnicreateparam.h @@ -1,6 +1,10 @@ #ifndef MXOMNICREATEPARAM_H #define MXOMNICREATEPARAM_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + #include #include "mxomnicreateflags.h" diff --git a/LEGO1/mxsemaphore.h b/LEGO1/mxsemaphore.h index 521678ac..eebb887e 100644 --- a/LEGO1/mxsemaphore.h +++ b/LEGO1/mxsemaphore.h @@ -1,6 +1,10 @@ #ifndef MX_SEMAPHORE_H #define MX_SEMAPHORE_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + #include "mxtypes.h" #include diff --git a/LEGO1/mxtimer.h b/LEGO1/mxtimer.h index 357cf410..78e1ca6d 100644 --- a/LEGO1/mxtimer.h +++ b/LEGO1/mxtimer.h @@ -1,6 +1,10 @@ #ifndef MXTIMER_H #define MXTIMER_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + #include "mxcore.h" // VTABLE 0x100dc0e0 diff --git a/LEGO1/mxvideoparamflags.h b/LEGO1/mxvideoparamflags.h index f25ab4bd..5ff02305 100644 --- a/LEGO1/mxvideoparamflags.h +++ b/LEGO1/mxvideoparamflags.h @@ -1,6 +1,10 @@ #ifndef MXVIDEOPARAMFLAGS_H #define MXVIDEOPARAMFLAGS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + #include // Must be union with struct for match.