Skip to content

Commit

Permalink
WXMedia workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
igiannakas committed Mar 7, 2024
1 parent 2b62017 commit 10d350d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/slic3r/GUI/MediaPlayCtrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion src/slic3r/GUI/wxMediaCtrl2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 10d350d

Please sign in to comment.