mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 04:20:28 +00:00
Add ttf_font_color to ext driver struct.
Does not need to bump ABI version.
This commit is contained in:
parent
1ced96c5e9
commit
13ae61031f
@ -232,6 +232,12 @@ static bool setup_video(ext_t *ext, const video_info_t *video, const input_drive
|
||||
else if ((type == SSNES_SHADER_BSNES || type == SSNES_SHADER_AUTO) && *g_settings.video.bsnes_shader_path)
|
||||
xml_shader = g_settings.video.bsnes_shader_path;
|
||||
|
||||
int font_color_r = g_settings.video.msg_color_r * 255;
|
||||
int font_color_g = g_settings.video.msg_color_g * 255;
|
||||
int font_color_b = g_settings.video.msg_color_b * 255;
|
||||
font_color_r = font_color_r > 255 ? 255 : (font_color_r < 0 ? 0 : font_color_r);
|
||||
font_color_g = font_color_g > 255 ? 255 : (font_color_g < 0 ? 0 : font_color_g);
|
||||
font_color_b = font_color_b > 255 ? 255 : (font_color_b < 0 ? 0 : font_color_b);
|
||||
|
||||
ssnes_video_info_t info = {
|
||||
.width = video->width,
|
||||
@ -246,7 +252,8 @@ static bool setup_video(ext_t *ext, const video_info_t *video, const input_drive
|
||||
.xml_shader = xml_shader,
|
||||
.cg_shader = cg_shader,
|
||||
.ttf_font = *g_settings.video.font_path ? g_settings.video.font_path : NULL,
|
||||
.ttf_font_size = g_settings.video.font_size
|
||||
.ttf_font_size = g_settings.video.font_size,
|
||||
.ttf_font_color = (font_color_r << 16) | (font_color_g << 8) | (font_color_b << 0),
|
||||
};
|
||||
|
||||
const ssnes_input_driver_t *input_driver = NULL;
|
||||
|
@ -108,7 +108,7 @@ typedef struct ssnes_video_info
|
||||
// Can be disregarded.
|
||||
const char *ttf_font;
|
||||
unsigned ttf_font_size;
|
||||
|
||||
unsigned ttf_font_color; // Font color, in format RGB888.
|
||||
} ssnes_video_info_t;
|
||||
|
||||
// Some convenience macros.
|
||||
|
Loading…
x
Reference in New Issue
Block a user