Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SteelT
SRB2
Commits
7cd60a54
Commit
7cd60a54
authored
6 years ago
by
Alam Ed Arias
Committed by
James R.
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Merge branch 'apng-oh-shit-fixes' into 'master'
Compiling errors for apng fixed See merge request
KartKrew/Kart-Public!69
parent
5620d018
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/apng.c
+26
-3
26 additions, 3 deletions
src/apng.c
src/apng.h
+16
-0
16 additions, 0 deletions
src/apng.h
with
42 additions
and
3 deletions
src/apng.c
+
26
−
3
View file @
7cd60a54
...
...
@@ -25,6 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include
"apng.h"
#define APNG_INFO_acTL 0x20000U
#define APNG_WROTE_acTL 0x10000U
struct
apng_info_def
...
...
@@ -59,6 +61,10 @@ size_t apng_default_tell (png_structp);
#endif
/* PNG_STDIO_SUPPORTED */
void
apng_write_IEND
(
png_structp
);
void
apng_write_acTL
(
png_structp
,
png_uint_32
,
png_uint_32
);
#ifndef PNG_WRITE_APNG_SUPPORTED
png_uint_32
apng_set_acTL_dummy
(
png_structp
,
png_infop
,
png_uint_32
,
png_uint_32
);
#endif
/* PNG_WRITE_APNG_SUPPORTED */
apng_infop
apng_create_info_struct
(
png_structp
pngp
)
...
...
@@ -145,7 +151,7 @@ apng_default_tell (png_structp pngp)
void
apng_set_write_fn
(
png_structp
pngp
,
apng_infop
ainfop
,
png_voidp
iop
,
png_rw_ptr
write_f
,
png_flush_ptr
flush_f
,
png_rw_ptr
write_f
,
png_flush_ptr
flush_f
,
apng_seek_ptr
seek_f
,
apng_tell_ptr
tell_f
)
{
if
(
!
(
pngp
&&
ainfop
))
...
...
@@ -204,7 +210,7 @@ apng_set_acTL (png_structp pngp, png_infop infop, apng_infop ainfop,
ainfop
->
num_frames
=
frames
;
ainfop
->
num_plays
=
plays
;
ainfop
->
valid
|=
PNG_INFO_acTL
;
ainfop
->
valid
|=
A
PNG_INFO_acTL
;
return
1
;
}
...
...
@@ -218,7 +224,7 @@ apng_write_info_before_PLTE (png_structp pngp, png_infop infop,
png_write_info_before_PLTE
(
pngp
,
infop
);
if
((
ainfop
->
valid
&
PNG_INFO_acTL
)
&&!
(
ainfop
->
mode
&
APNG_WROTE_acTL
))
if
((
ainfop
->
valid
&
A
PNG_INFO_acTL
)
&&!
(
ainfop
->
mode
&
APNG_WROTE_acTL
))
{
ainfop
->
start_acTL
=
apng_tell
(
pngp
,
ainfop
);
...
...
@@ -253,6 +259,19 @@ apng_write_end (png_structp pngp, png_infop infop, apng_infop ainfop)
#endif
/* PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED */
}
#ifndef PNG_WRITE_APNG_SUPPORTED
png_uint_32
apng_set_acTL_dummy
(
png_structp
pngp
,
png_infop
infop
,
png_uint_32
frames
,
png_uint_32
plays
)
{
(
void
)
pngp
;
(
void
)
infop
;
(
void
)
frames
;
(
void
)
plays
;
return
0
;
}
#endif
/* PNG_WRITE_APNG_SUPPORTED */
/* Dynamic runtime linking capable! (Hopefully.) */
void
apng_set_set_acTL_fn
(
png_structp
pngp
,
apng_infop
ainfop
,
...
...
@@ -260,7 +279,11 @@ apng_set_set_acTL_fn (png_structp pngp, apng_infop ainfop,
{
(
void
)
pngp
;
if
(
!
ainfop
->
set_acTL_fn
)
#ifndef PNG_WRITE_APNG_SUPPORTED
ainfop
->
set_acTL_fn
=
&
apng_set_acTL_dummy
;
#else
ainfop
->
set_acTL_fn
=
&
png_set_acTL
;
#endif
/* PNG_WRITE_APNG_SUPPORTED */
else
ainfop
->
set_acTL_fn
=
set_acTL_f
;
}
This diff is collapsed.
Click to expand it.
src/apng.h
+
16
−
0
View file @
7cd60a54
...
...
@@ -23,6 +23,22 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef APNG_H
#define APNG_H
#ifndef _MSC_VER
#ifndef _WII
#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
#endif
#endif
#ifndef _LFS64_LARGEFILE
#define _LFS64_LARGEFILE
#endif
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 0
#endif
#include
<png.h>
typedef
struct
apng_info_def
apng_info
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment