From 81250657f0056be820aa9fe427ec10ba8425a3af Mon Sep 17 00:00:00 2001 From: Themaister Date: Thu, 6 Oct 2011 19:10:01 +0200 Subject: [PATCH] Change default font color to yellow. --- config.def.h | 2 +- gfx/sdl.c | 8 ++++++-- gfx/xvideo.c | 8 ++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/config.def.h b/config.def.h index 3f32d4cd3b..3b80dc180c 100644 --- a/config.def.h +++ b/config.def.h @@ -146,7 +146,7 @@ static const unsigned font_size = 48; static const float message_pos_offset_x = 0.05; static const float message_pos_offset_y = 0.05; // Color of the message. -static const uint32_t message_color = 0xffffff; // RGB hex value. +static const uint32_t message_color = 0xffff00; // RGB hex value. // Render-to-texture before rendering to screen (multi-pass shaders) static const bool render_to_texture = false; diff --git a/gfx/sdl.c b/gfx/sdl.c index 5a706b8933..f6e0c8dd75 100644 --- a/gfx/sdl.c +++ b/gfx/sdl.c @@ -80,9 +80,13 @@ static void sdl_gfx_free(void *data) static void sdl_init_font(sdl_video_t *vid, const char *font_path, unsigned font_size) { #ifdef HAVE_FREETYPE - if (*font_path) + const char *path = font_path; + if (!*path) + path = font_renderer_get_default_font(); + + if (path) { - vid->font = font_renderer_new(font_path, font_size); + vid->font = font_renderer_new(path, font_size); if (vid->font) { int r = g_settings.video.msg_color_r * 255; diff --git a/gfx/xvideo.c b/gfx/xvideo.c index a2218e1d31..bf9aa65e3d 100644 --- a/gfx/xvideo.c +++ b/gfx/xvideo.c @@ -184,9 +184,13 @@ static void set_fullscreen(xv_t *xv) static void xv_init_font(xv_t *xv, const char *font_path, unsigned font_size) { #ifdef HAVE_FREETYPE - if (*font_path) + const char *path = font_path; + if (!*path) + path = font_renderer_get_default_font(); + + if (path) { - xv->font = font_renderer_new(font_path, font_size); + xv->font = font_renderer_new(path, font_size); if (xv->font) { int r = g_settings.video.msg_color_r * 255;