From 10d350d8a4efc47fdb054941cf98499ea22993a4 Mon Sep 17 00:00:00 2001 From: igiannakas Date: Thu, 7 Mar 2024 16:14:36 +0000 Subject: [PATCH] WXMedia workaround --- src/slic3r/GUI/MediaPlayCtrl.h | 3 +++ src/slic3r/GUI/wxMediaCtrl2.h | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/MediaPlayCtrl.h b/src/slic3r/GUI/MediaPlayCtrl.h index 79ce3a4b9ca..74ce43040c1 100644 --- a/src/slic3r/GUI/MediaPlayCtrl.h +++ b/src/slic3r/GUI/MediaPlayCtrl.h @@ -65,10 +65,13 @@ class MediaPlayCtrl : public wxPanel static bool get_stream_url(std::string *url = nullptr); private: +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wenum-constexpr-conversion" static constexpr wxMediaState MEDIASTATE_IDLE = (wxMediaState) 3; static constexpr wxMediaState MEDIASTATE_INITIALIZING = (wxMediaState) 4; static constexpr wxMediaState MEDIASTATE_LOADING = (wxMediaState) 5; static constexpr wxMediaState MEDIASTATE_BUFFERING = (wxMediaState) 6; +#pragma clang diagnostic pop wxMediaCtrl2 * m_media_ctrl; wxMediaState m_last_state = MEDIASTATE_IDLE; diff --git a/src/slic3r/GUI/wxMediaCtrl2.h b/src/slic3r/GUI/wxMediaCtrl2.h index 3f1467a13f2..1604b2c2c22 100644 --- a/src/slic3r/GUI/wxMediaCtrl2.h +++ b/src/slic3r/GUI/wxMediaCtrl2.h @@ -33,8 +33,10 @@ class wxMediaCtrl2 : public wxWindow wxSize GetVideoSize() const; int GetLastError() const { return m_error; } - +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wenum-constexpr-conversion" static constexpr wxMediaState MEDIASTATE_BUFFERING = (wxMediaState) 6; +#pragma clang diagnostic pop protected: void DoSetSize(int x, int y, int width, int height, int sizeFlags) override;