Disable use of composition in forty demo under MSW

This is ugly but allows the carts to be visible while they're being
dragged again under MSW.

The game still doesn't work at all under GTK/Wayland (and probably
macOS).
This commit is contained in:
Vadim Zeitlin 2022-10-17 15:42:56 +01:00
parent 9261816feb
commit 3a7394fe08

View file

@ -35,6 +35,15 @@ FortyCanvas::FortyCanvas(wxWindow* parent, const wxPoint& pos, const wxSize& siz
m_playerDialog(0),
m_leftBtnDown(false)
{
#ifdef __WXMSW__
// Unfortunately the redraw logic here is incompatible with double
// buffering under MSW, so we have to disable it. The proper solution would
// be to rewrite this logic, as this is also required to make it work under
// GTK/Wayland and macOS, where the game currently doesn't update its
// display at all.
MSWDisableComposited();
#endif
SetScrollbars(0, 0, 0, 0);
#ifdef __WXGTK__