projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wxDisplay::GetFromWindow is only on msw evidently
[wxWidgets.git]
/
src
/
common
/
gifdecod.cpp
diff --git
a/src/common/gifdecod.cpp
b/src/common/gifdecod.cpp
index 732557ca3b2d7fa1c623fa8f95a92ae27dcee8d4..f49f473d3baa03e1522ee55ee101b17ca7b9b621 100644
(file)
--- a/
src/common/gifdecod.cpp
+++ b/
src/common/gifdecod.cpp
@@
-271,17
+271,19
@@
bool wxGIFDecoder::GoPrevFrame(bool cyclic)
bool wxGIFDecoder::GoFrame(int which)
{
bool wxGIFDecoder::GoFrame(int which)
{
- int i;
-
if (!IsAnimation())
return false;
if ((which >= 1) && (which <= m_nimages))
{
if (!IsAnimation())
return false;
if ((which >= 1) && (which <= m_nimages))
{
+ m_image = 1;
m_pimage = m_pfirst;
m_pimage = m_pfirst;
- for (i = 0; i < which; i++)
+ while (m_image < which)
+ {
+ m_image++;
m_pimage = m_pimage->next;
m_pimage = m_pimage->next;
+ }
return true;
}
return true;
}
@@
-621,7
+623,7
@@
bool wxGIFDecoder::CanRead()
if ( !m_f->Read(buf, WXSIZEOF(buf)) )
return false;
if ( !m_f->Read(buf, WXSIZEOF(buf)) )
return false;
- m_f->SeekI(-(
off_
t)WXSIZEOF(buf), wxFromCurrent);
+ m_f->SeekI(-(
wxFileOffse
t)WXSIZEOF(buf), wxFromCurrent);
return memcmp(buf, "GIF", WXSIZEOF(buf)) == 0;
}
return memcmp(buf, "GIF", WXSIZEOF(buf)) == 0;
}
@@
-752,7
+754,7
@@
int wxGIFDecoder::ReadGIF()
transparent = buf[4];
/* read disposal method */
transparent = buf[4];
/* read disposal method */
- disposal = (
buf[1] & 0x1C
) - 1;
+ disposal = (
(buf[1] & 0x1C) >> 2
) - 1;
}
else
/* other extension, skip */
}
else
/* other extension, skip */