mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 00:49:47 +00:00
GDI: use configured message color for OSD/menu text
This commit is contained in:
parent
1828e891ad
commit
75eed7997b
@ -91,6 +91,9 @@ static void gdi_render_msg(
|
|||||||
const struct font_params *params = (const struct font_params*)userdata;
|
const struct font_params *params = (const struct font_params*)userdata;
|
||||||
unsigned width = video_info->width;
|
unsigned width = video_info->width;
|
||||||
unsigned height = video_info->height;
|
unsigned height = video_info->height;
|
||||||
|
unsigned red;
|
||||||
|
unsigned green;
|
||||||
|
unsigned blue;
|
||||||
|
|
||||||
if (!font || string_is_empty(msg))
|
if (!font || string_is_empty(msg))
|
||||||
return;
|
return;
|
||||||
@ -101,6 +104,9 @@ static void gdi_render_msg(
|
|||||||
y = params->y;
|
y = params->y;
|
||||||
scale = params->scale;
|
scale = params->scale;
|
||||||
align = params->text_align;
|
align = params->text_align;
|
||||||
|
red = FONT_COLOR_GET_RED(params->color);
|
||||||
|
green = FONT_COLOR_GET_GREEN(params->color);
|
||||||
|
blue = FONT_COLOR_GET_BLUE(params->color);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -108,6 +114,9 @@ static void gdi_render_msg(
|
|||||||
y = video_info->font_msg_pos_y;
|
y = video_info->font_msg_pos_y;
|
||||||
scale = 1.0f;
|
scale = 1.0f;
|
||||||
align = TEXT_ALIGN_LEFT;
|
align = TEXT_ALIGN_LEFT;
|
||||||
|
red = video_info->font_msg_color_r * 255.0f;
|
||||||
|
green = video_info->font_msg_color_g * 255.0f;
|
||||||
|
blue = video_info->font_msg_color_b * 255.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!font->gdi)
|
if (!font->gdi)
|
||||||
@ -135,7 +144,7 @@ static void gdi_render_msg(
|
|||||||
|
|
||||||
font->gdi->bmp_old = (HBITMAP)SelectObject(font->gdi->memDC, font->gdi->bmp);
|
font->gdi->bmp_old = (HBITMAP)SelectObject(font->gdi->memDC, font->gdi->bmp);
|
||||||
SetBkMode(font->gdi->memDC, TRANSPARENT);
|
SetBkMode(font->gdi->memDC, TRANSPARENT);
|
||||||
SetTextColor(font->gdi->memDC, RGB(255,255,255));
|
SetTextColor(font->gdi->memDC, RGB(red, green, blue));
|
||||||
TextOut(font->gdi->memDC, newX, newY, msg, len);
|
TextOut(font->gdi->memDC, newX, newY, msg, len);
|
||||||
SelectObject(font->gdi->memDC, font->gdi->bmp_old);
|
SelectObject(font->gdi->memDC, font->gdi->bmp_old);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user