mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Blit fonts to full viewport.
This commit is contained in:
parent
e545d695ec
commit
8ee747a12d
@ -404,11 +404,8 @@ static const bool crop_overscan = true;
|
||||
#if defined(HAVE_RMENU)
|
||||
static const float font_size = 1.0f;
|
||||
#else
|
||||
static const float font_size = 48;
|
||||
static const float font_size = 32;
|
||||
#endif
|
||||
// Attempt to scale the font size.
|
||||
// The scale factor will be window_size / desktop_size.
|
||||
static const bool font_scale = true;
|
||||
|
||||
// Offset for where messages will be placed on-screen. Values are in range [0.0, 1.0].
|
||||
static const float message_pos_offset_x = 0.05;
|
||||
|
@ -36,8 +36,8 @@ bool font_renderer_create_default(const font_renderer_driver_t **driver, void **
|
||||
unsigned i;
|
||||
for (i = 0; font_backends[i]; i++)
|
||||
{
|
||||
const char *path = NULL;
|
||||
if (!font_path)
|
||||
const char *path = font_path;
|
||||
if (!path)
|
||||
path = font_backends[i]->get_default_font();
|
||||
if (!path)
|
||||
continue;
|
||||
|
@ -123,7 +123,7 @@ static void render_message(gl_raster_t *font, const char *msg, GLfloat scale, co
|
||||
if (gl->shader && gl->shader->use)
|
||||
gl->shader->use(gl, GL_SHADER_STOCK_BLEND);
|
||||
|
||||
gl_set_viewport(gl, gl->win_width, gl->win_height, false, false);
|
||||
gl_set_viewport(gl, gl->win_width, gl->win_height, true, false);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glBindTexture(GL_TEXTURE_2D, font->tex);
|
||||
@ -206,6 +206,7 @@ static void render_message(gl_raster_t *font, const char *msg, GLfloat scale, co
|
||||
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
|
||||
|
||||
glDisable(GL_BLEND);
|
||||
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
|
||||
}
|
||||
|
||||
static void gl_render_msg(void *data, const char *msg, const struct font_params *params)
|
||||
|
@ -180,10 +180,7 @@
|
||||
# video_font_path =
|
||||
|
||||
# Size of the font rendered.
|
||||
# video_font_size = 48
|
||||
|
||||
# Attempt to scale the font to fit better for multiple window sizes.
|
||||
# video_font_scale = true
|
||||
# video_font_size = 32
|
||||
|
||||
# Enable usage of OSD messages.
|
||||
# video_font_enable = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user