diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp index b48ff07c..83e053bf 100644 --- a/src/wx/panel.cpp +++ b/src/wx/panel.cpp @@ -1042,9 +1042,8 @@ void GameArea::OnIdle(wxIdleEvent& event) #endif // On windows with the vcpkg version of wxWidgets which is 3.1.2, the - // wxEXPAND flag throws an XRC error, but everything works fine without it. - // On GTK however, the flag is necessary. -#if defined(__WXMSW__) + // wxEXPAND flag throws an XRC error, but it is necessary on earlier versions of wxWidgets +#if defined(__WXMSW__) && wxCHECK_VERSION(3, 1, 2) GetSizer()->Add(w, frame_priority, gopts.retain_aspect ? (wxSHAPED | wxALIGN_CENTER_HORIZONTAL) : wxEXPAND); #else GetSizer()->Add(w, frame_priority, gopts.retain_aspect ? (wxSHAPED | wxALIGN_CENTER_HORIZONTAL | wxEXPAND) : wxEXPAND);