Skip to content
This repository has been archived by the owner on Oct 12, 2020. It is now read-only.

Commit

Permalink
For future libpng/lodepng stuff ...
Browse files Browse the repository at this point in the history
  • Loading branch information
lgblgblgb committed Mar 10, 2016
1 parent 7ad0514 commit 3fbefda
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
7 changes: 7 additions & 0 deletions lodepng.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ freely, subject to the following restrictions:
The manual and changelog are in the header file "lodepng.h"
*/


#include "xepem.h"
#ifdef USE_LODEPNG

#include "lodepng.h"

#include <stdio.h>
Expand Down Expand Up @@ -5907,3 +5911,6 @@ const char* lodepng_error_text(unsigned code)
}
#endif /*LODEPNG_COMPILE_ERROR_TEXT*/


#endif

8 changes: 6 additions & 2 deletions screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

#include "xepem.h"
#ifdef USE_LODEPNG
#include "lodepng.h"
#else
#include "png.h"
#endif

int is_fullscreen = 0;
SDL_Window *sdl_win = NULL;
Expand Down Expand Up @@ -260,11 +264,11 @@ int screen_shot ( Uint32 *ep_pixels, const char *directory, const char *filename
if (lodepng_encode24_file(fn, (unsigned char*)pix, SCREEN_WIDTH, SCREEN_HEIGHT * 2)) {
free(pix);
ERROR_WINDOW("LodePNG screenshot taking error");
return 0;
return 1;
} else {
free(pix);
OSD("Screenshot:\n%s", fn + strlen(directory));
return 1;
return 0;
}
}

Expand Down
2 changes: 2 additions & 0 deletions xepem.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define VERSION "v0.1"
#define COPYRIGHT "(C)2015,2016 LGB Gabor Lenart"

#define USE_LODEPNG

// more accurate :) from IstvanV
#define NICK_SLOTS_PER_SEC 889846
#define DEFAULT_CPU_CLOCK 4000000
Expand Down

0 comments on commit 3fbefda

Please sign in to comment.