Ejemplo n.º 1
0
static void *libdbg_font_init_font(void *gl_data, const char *font_path, float font_size)
{
   unsigned width, height;

   video_driver_get_size(&width, &height);

   (void)font_path;
   (void)font_size;
   (void)width;
   (void)height;

   DbgFontConfig cfg;
#if defined(SN_TARGET_PSP2)
   cfg.fontSize     = SCE_DBGFONT_FONTSIZE_LARGE;
#elif defined(__CELLOS_LV2__)
   cfg.bufSize      = SCE_DBGFONT_BUFSIZE_LARGE;
   cfg.screenWidth  = width;
   cfg.screenHeight = height;
#endif

   DbgFontInit(&cfg);

   /* Doesn't need any state. */
   return (void*)-1;
}
Ejemplo n.º 2
0
static bool gl_init_font(void *data, const char *font_path, float font_size)
{
   (void)font_path;
   (void)font_size;

   font_renderer_t *handle = (font_renderer_t*)calloc(1, sizeof(*handle));
   if (!handle)
      return NULL;

   DbgFontConfig cfg;
#if defined(SN_TARGET_PSP2)
   cfg.fontSize     = SCE_DBGFONT_FONTSIZE_LARGE;
#elif defined(__CELLOS_LV2__)
   // FIXME - We need to do init_font_first in gl_start because of this
   gl_t *gl = (gl_t*)driver.video_data;

   cfg.bufSize      = SCE_DBGFONT_BUFSIZE_LARGE;
   cfg.screenWidth  = gl->win_width;
   cfg.screenHeight = gl->win_height;
#endif

   DbgFontInit(&cfg);

   return true;
}
Ejemplo n.º 3
0
static bool gl_init_font(void *data, const char *font_path, float font_size,
      unsigned win_width, unsigned win_height)
{
   (void)font_path;
   (void)font_size;

   font_renderer_t *handle = (font_renderer_t*)calloc(1, sizeof(*handle));
   if (!handle)
      return NULL;

   DbgFontConfig cfg;
#if defined(SN_TARGET_PSP2)
   cfg.fontSize     = SCE_DBGFONT_FONTSIZE_LARGE;
#elif defined(__CELLOS_LV2__)
   cfg.bufSize      = SCE_DBGFONT_BUFSIZE_LARGE;
   cfg.screenWidth  = win_width;
   cfg.screenHeight = win_height;
#endif

   DbgFontInit(&cfg);
   free(handle);

   return true;
}