]> git.pld-linux.org Git - packages/crossmingw32-wxWidgets.git/blame - wxWidgets-gif0delay.patch
- comment fix
[packages/crossmingw32-wxWidgets.git] / wxWidgets-gif0delay.patch
CommitLineData
df17edb2
JB
1Protection against 0 (too short in general) delay in GIF animation.
2It caused xchm to hang just animating GIF without actually displaying anything.
ddbd2b74 3(affected wxgtk*; not wxx11univ because of different implementation)
df17edb2
JB
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.146681 seconds and 4 git commands to generate.