Change double texture error to warning

parent 5e1fff76
## ExampleLib Example: an example of using Automake to link with a library
AC_INIT([freetype-gl], [1.9], [bernd@net2o.de], [freetype-gl for Linux/Android],
AC_INIT([freetype-gl], [1.10], [bernd@net2o.de], [freetype-gl for Linux/Android],
[https://github.com/forthy42/freetype-gl])
AC_PREREQ([2.59])
AM_INIT_AUTOMAKE([1.10 -Wall no-define])
......
......@@ -9,6 +9,7 @@
#include "freetype-gl-err.h"
__THREAD int freetype_gl_errno=0;
__THREAD int freetype_gl_warnings=0;
__THREAD char * freetype_gl_message=NULL;
#ifdef __ANDROID__
......
......@@ -29,6 +29,11 @@ namespace ftgl {
* Errors < FTGL_ERR_BASE are pass-through from Freetype
*/
extern __THREAD int freetype_gl_errno;
/**
* freetype_gl_warnings is a flag that activates output of warnings.
* Default is warnings off
*/
extern __THREAD int freetype_gl_warnings;
/**
* freetype_gl_message is the error message if a freetype-gl function fails
*/
......@@ -61,6 +66,12 @@ extern char* freetype_gl_errstrs[];
freetype_gl_errhook(freetype_gl_errno, freetype_gl_message, __VA_ARGS__); \
}
#define freetype_gl_warning(errno, ...) { \
freetype_gl_errno = FTGL_ERR_CAT( FTGL_ERR_PREFIX, errno); \
freetype_gl_message = freetype_gl_errstrs[FTGL_ERR_CAT( FTGL_ERR_PREFIX, errno)-FTGL_ERR_BASE]; \
if(freetype_gl_warnings) freetype_gl_errhook(freetype_gl_errno, freetype_gl_message, __VA_ARGS__); \
}
#define freetype_error(error, ...) { \
freetype_gl_errno = FT_Errors[error].code; \
freetype_gl_message = (char*)FT_Errors[error].message; \
......
......@@ -886,10 +886,10 @@ cleanup_stroker:
if ( region.x < 0 )
{
freetype_gl_error( Texture_Atlas_Full,
"Texture atlas is full, asked for %i*%i (%s:%d)\n",
tgt_w, tgt_h,
__FILENAME__, __LINE__ );
freetype_gl_warning( Texture_Atlas_Full,
"Texture atlas is full, asked for %i*%i (%s:%d)\n",
tgt_w, tgt_h,
__FILENAME__, __LINE__ );
texture_font_close( self, MODE_AUTO_CLOSE, MODE_AUTO_CLOSE );
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment