]> git.pld-linux.org Git - packages/crossmingw32-wxWidgets.git/blob - wxWidgets-gif0delay.patch
- updated from wxWindows-*
[packages/crossmingw32-wxWidgets.git] / wxWidgets-gif0delay.patch
1 Protection against 0 (too short in general) delay in GIF animation.
2 It caused xchm to hang just animating GIF without actually displaying anything.
3 (affected wxgtk*; not wxx11univ not because of different implementation)
4
5 --- wxWidgets-2.5.3/src/html/m_image.cpp.orig   2004-09-28 13:18:36.000000000 +0200
6 +++ wxWidgets-2.5.3/src/html/m_image.cpp        2005-02-20 21:06:55.564796160 +0100
7 @@ -337,6 +337,11 @@
8  
9      DECLARE_NO_COPY_CLASS(wxGIFTimer)
10  };
11 +
12 +static int safedelay(int ms)
13 +{
14 +       return (ms >= 10) ? ms : 10;
15 +}
16  #endif
17  
18  
19 @@ -390,7 +395,7 @@
20                          if ( m_gifDecoder->IsAnimation() )
21                          {
22                              m_gifTimer = new wxGIFTimer(this);
23 -                            m_gifTimer->Start(m_gifDecoder->GetDelay(), true);
24 +                            m_gifTimer->Start(safedelay(m_gifDecoder->GetDelay()), true);
25                          }
26                          else
27                          {
28 @@ -517,7 +522,7 @@
29          m_window->Refresh(img.HasMask(), &rect);
30      }
31  
32 -    timer->Start(m_gifDecoder->GetDelay(), true);
33 +    timer->Start(safedelay(m_gifDecoder->GetDelay()), true);
34  }
35  
36  void wxHtmlImageCell::Layout(int w)
This page took 0.075096 seconds and 3 git commands to generate.