- add hd51; mostly ported from TangoCash's neutrino-mp

This commit is contained in:
vanhofen
2017-10-05 12:52:53 +02:00
committed by Thilo Graf
parent 4f8b891d26
commit 6fe5d269af
30 changed files with 2528 additions and 227 deletions

View File

@@ -321,11 +321,6 @@ void LcdFont::RenderString(int x, int y, const int width, const char * text, con
pthread_mutex_unlock(&renderer->render_mutex);
}
int LcdFont::getRenderWidth(const std::string &text, const bool utf8_encoded)
{
return getRenderWidth(text.c_str(), utf8_encoded);
};
int LcdFont::getRenderWidth(const char * text, const bool utf8_encoded)
{
pthread_mutex_lock(&renderer->render_mutex);

View File

@@ -56,15 +56,13 @@ class LcdFont
FT_Error getGlyphBitmap(FT_ULong glyph_index, FTC_SBit *sbit);
public:
void RenderString(int x, int y, int width, const char *text, int color,
int selected = 0, const bool utf8_encoded = true);
public:
void RenderString(int x, int y, int width, const char *text, int color, int selected=0, const bool utf8_encoded = false);
int getRenderWidth(const char *text, const bool utf8_encoded = true);
int getRenderWidth(const std::string &text, const bool utf8_encoded = true);
int getRenderWidth(const char *text, const bool utf8_encoded = false);
LcdFont(CLCDDisplay *fb, LcdFontRenderClass *render, FTC_FaceID faceid, int isize);
~LcdFont(){}
LcdFont(CLCDDisplay *fb, LcdFontRenderClass *render, FTC_FaceID faceid, int isize);
~LcdFont(){}
};

View File

@@ -25,7 +25,7 @@
*/
#include <config.h>
#ifdef HAVE_SPARK_HARDWARE
#if HAVE_SPARK_HARDWARE
#define HAVE_GENERIC_HARDWARE 1
#endif
#include "lcddisplay.h"
@@ -458,7 +458,11 @@ bool CLCDDisplay::load_png(const char * const filename)
png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL);
else
{
#if (PNG_LIBPNG_VER < 10500)
if (!(setjmp(png_ptr->jmpbuf)))
#else
if (!setjmp(png_jmpbuf(png_ptr)))
#endif
{
png_init_io(png_ptr,fh);