From 5bf7f1e57ac10ccac17f37622a798e81e31813e4 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 30 Jun 2023 08:31:48 +0200 Subject: [PATCH] Add const alternative for LegoOmni::Create and MxVideoParam, only available for MinGW --- LEGO1/legoomni.cpp | 7 +++++++ LEGO1/mxvideoparam.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/LEGO1/legoomni.cpp b/LEGO1/legoomni.cpp index 365748e7..fe71c4a3 100644 --- a/LEGO1/legoomni.cpp +++ b/LEGO1/legoomni.cpp @@ -182,6 +182,13 @@ MxResult LegoOmni::Create(MxOmniCreateParam &p) return SUCCESS; } +#if defined(__MINGW32__) +MxResult LegoOmni::Create(const MxOmniCreateParam &p) +{ + return Create((MxOmniCreateParam &)p); +} +#endif + void LegoOmni::Destroy() { // FIXME: Stub diff --git a/LEGO1/mxvideoparam.h b/LEGO1/mxvideoparam.h index 3e00a920..b757e26a 100644 --- a/LEGO1/mxvideoparam.h +++ b/LEGO1/mxvideoparam.h @@ -18,6 +18,13 @@ class MxVideoParam __declspec(dllexport) MxVideoParam &operator=(const MxVideoParam &); __declspec(dllexport) ~MxVideoParam(); +#ifdef __MINGW32__ + __declspec(dllexport) MxVideoParam(const MxRect32 &rect, MxPalette *pal, unsigned long p3, const MxVideoParamFlags &flags) + : MxVideoParam((MxRect32 &)rect, pal, p3, (MxVideoParamFlags &)flags) + { + } +#endif + __declspec(dllexport) void SetDeviceName(char *id); inline MxVideoParamFlags &flags() { return m_flags; }