From 3a7394fe088dc65e244355a17406aea93c74017d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 17 Oct 2022 15:42:56 +0100 Subject: [PATCH] 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). --- demos/forty/canvas.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/demos/forty/canvas.cpp b/demos/forty/canvas.cpp index 257d244370..fa94e9daa4 100644 --- a/demos/forty/canvas.cpp +++ b/demos/forty/canvas.cpp @@ -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__