diff --git a/gfx/fonts/gl_font.c b/gfx/fonts/gl_font.c index 97548324f4..219c6e152e 100644 --- a/gfx/fonts/gl_font.c +++ b/gfx/fonts/gl_font.c @@ -18,7 +18,7 @@ #include "../../general.h" static const gl_font_renderer_t *gl_font_backends[] = { -#ifdef HAVE_LIBDBGFONT +#if defined(HAVE_LIBDBGFONT) && !defined(HAVE_RGUI) &libdbg_font, #else &gl_raster_font, diff --git a/gfx/fonts/gl_raster_font.c b/gfx/fonts/gl_raster_font.c index d5a6933d82..2f0716bbeb 100644 --- a/gfx/fonts/gl_raster_font.c +++ b/gfx/fonts/gl_raster_font.c @@ -204,9 +204,16 @@ static void blit_fonts(gl_t *gl, const struct font_output *head, const struct fo } glPixelStorei(GL_UNPACK_ALIGNMENT, 8); +#if defined(HAVE_PSGL) + glBufferSubData(GL_TEXTURE_REFERENCE_BUFFER_SCE, + gl->tex_w * gl->tex_h * gl->tex_index * gl->base_size, + gl->tex_w * gl->tex_h * gl->base_size, + gl->font_tex_buf); +#else glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, gl->font_tex_w, gl->font_tex_h, GL_RGBA, GL_UNSIGNED_BYTE, gl->font_tex_buf); +#endif } static void calculate_font_coords(gl_t *gl, diff --git a/gfx/gl.c b/gfx/gl.c index ac1f4cecc3..77c4661333 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -1028,14 +1028,13 @@ static void gl_update_input_size(void *data, unsigned width, unsigned height, un if (clear) { + glPixelStorei(GL_UNPACK_ALIGNMENT, get_alignment(width * sizeof(uint32_t))); #if defined(HAVE_PSGL) glBufferSubData(GL_TEXTURE_REFERENCE_BUFFER_SCE, gl->tex_w * gl->tex_h * gl->tex_index * gl->base_size, gl->tex_w * gl->tex_h * gl->base_size, gl->empty_buf); #else - glPixelStorei(GL_UNPACK_ALIGNMENT, get_alignment(width * sizeof(uint32_t))); - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, gl->tex_w, gl->tex_h, gl->texture_type, gl->texture_fmt, gl->empty_buf); diff --git a/griffin/griffin.c b/griffin/griffin.c index cf4bc3fcb4..e893a15035 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -263,7 +263,7 @@ FONTS #include "../gfx/fonts/d3d_font.c" #endif -#if defined(HAVE_LIBDBGFONT) +#if defined(HAVE_LIBDBGFONT) && !defined(HAVE_RGUI) #include "../gfx/fonts/ps_libdbgfont.c" #elif defined(HAVE_OPENGL) #include "../gfx/fonts/gl_raster_font.c"