Skip to content

Commit

Permalink
Use gif-h as submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
Vogtinator committed Jan 18, 2016
1 parent b8c578e commit 2ccf52c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 826 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "core/gif-h"]
path = core/gif-h
url = https://github.com/jacobly0/gif-h
1 change: 1 addition & 0 deletions core/gif-h
Submodule gif-h added at 704223
8 changes: 6 additions & 2 deletions core/gif.cpp
Expand Up @@ -6,7 +6,9 @@
#include "gif.h"
#include "lcd.h"

#include "giflib.h"
// We can't modify giflib.h ourselves, so #include that here.
#include "os/os.h"
#include "gif-h/gif.h"

struct RGB24 {
uint8_t r, g, b, a;
Expand All @@ -25,7 +27,9 @@ bool gif_start_recording(const char *filename, unsigned int frameskip)
framenr = framenrskip = frameskip;
framedelay = 100 / (60/(frameskip+1));

if(GifBegin(&writer, filename, 320, 240, framedelay))
FILE *gif_file = fopen_utf8(filename, "w");

if(gif_file && GifBegin(&writer, gif_file, 320, 240, framedelay))
recording = true;

buffer.resize(320*240);
Expand Down

0 comments on commit 2ccf52c

Please sign in to comment.