Move font stuff to gfx/fonts.

This commit is contained in:
Themaister 2012-05-27 02:04:50 +02:00
parent 4176ddeccc
commit ca0a5b9f76
13 changed files with 21 additions and 59 deletions

View File

@ -105,7 +105,7 @@ ifeq ($(HAVE_SDL), 1)
LIBS += $(SDL_LIBS)
ifeq ($(HAVE_OPENGL), 1)
OBJ += gfx/gl.o gfx/gl_font.o gfx/context/font_freetype_ctx.o
OBJ += gfx/gl.o gfx/fonts/freetype.o
ifeq ($(OSX),1)
LIBS += -framework OpenGL
else
@ -147,7 +147,7 @@ ifeq ($(HAVE_DYLIB), 1)
endif
ifeq ($(HAVE_FREETYPE), 1)
OBJ += gfx/fonts.o
OBJ += gfx/fonts/fonts.o
LIBS += $(FREETYPE_LIBS)
DEFINES += $(FREETYPE_CFLAGS)
endif

View File

@ -39,7 +39,7 @@ ifeq ($(TDM_GCC),)
endif
ifeq ($(HAVE_SDL), 1)
OBJ += gfx/sdl_gfx.o gfx/gl.o gfx/gl_font.o gfx/context/sdl_ctx.o input/sdl_input.o audio/sdl_audio.o fifo_buffer.o
OBJ += gfx/sdl_gfx.o gfx/gl.o gfx/fonts/freetype.o gfx/context/sdl_ctx.o input/sdl_input.o audio/sdl_audio.o fifo_buffer.o
LIBS += -lSDL
DEFINES += -ISDL -DHAVE_SDL
endif
@ -100,7 +100,7 @@ ifeq ($(HAVE_NETPLAY), 1)
endif
ifeq ($(HAVE_FREETYPE), 1)
OBJ += gfx/fonts.o
OBJ += gfx/fonts/fonts.o
DEFINES += -DHAVE_FREETYPE -Ifreetype2
LIBS += -lfreetype -lz
endif

View File

@ -28,37 +28,30 @@
void gfx_ctx_set_swap_interval(unsigned interval, bool inited)
{
bool success = false;
if(inited)
if (inited)
{
success = true;
if (interval)
glEnable(GL_VSYNC_SCE);
else
glDisable(GL_VSYNC_SCE);
}
if (!success)
RARCH_WARN("Failed to set swap interval.\n");
}
void gfx_ctx_check_window(bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
{
gl_t *gl = driver.video_data;
*quit = false;
*resize = false;
gl_t *gl = driver.video_data;
#ifdef HAVE_SYSUTILS
cellSysutilCheckCallback();
#endif
if(gl->quitting)
if (gl->quitting)
*quit = true;
if(gl->should_resize)
if (gl->should_resize)
*resize = true;
}
@ -66,3 +59,4 @@ bool gfx_ctx_window_has_focus(void)
{
return true;
}

View File

@ -25,7 +25,7 @@
#include "gfx_common.h"
#ifdef HAVE_FREETYPE
#include "fonts.h"
#include "fonts/fonts.h"
#endif
#ifdef HAVE_PYTHON

View File

@ -14,7 +14,7 @@
*/
#include "fonts.h"
#include "../file.h"
#include "../../file.h"
#include <string.h>
#include <stddef.h>
#include <stdlib.h>

View File

@ -16,7 +16,7 @@
#include "../gl_common.h"
void gl_init_font_ctx(gl_t *gl, const char *font_path, unsigned font_size)
void gl_init_font(gl_t *gl, const char *font_path, unsigned font_size)
{
#ifdef HAVE_FREETYPE
if (!g_settings.video.font_enable)
@ -66,7 +66,7 @@ void gl_init_font_ctx(gl_t *gl, const char *font_path, unsigned font_size)
#endif
}
void gl_deinit_font_ctx(gl_t *gl)
void gl_deinit_font(gl_t *gl)
{
#ifdef HAVE_FREETYPE
if (gl->font)
@ -221,7 +221,7 @@ static void calculate_font_coords(gl_t *gl,
}
#endif
void gl_render_msg_ctx(gl_t *gl, const char *msg)
void gl_render_msg(gl_t *gl, const char *msg)
{
#ifdef HAVE_FREETYPE
if (!gl->font)

View File

@ -23,13 +23,14 @@ void gl_init_font(gl_t *gl, const char *font_path, unsigned font_size)
(void)font_size;
}
void gl_deinit_font_ctx(gl_t *gl)
void gl_deinit_font(gl_t *gl)
{
(void)gl;
}
void gl_render_msg_ctx(gl_t *gl, const char *msg)
void gl_render_msg(gl_t *gl, const char *msg)
{
(void)gl;
(void)msg;
}

View File

@ -46,9 +46,8 @@
#include "shader_glsl.h"
#endif
#ifdef HAVE_FREETYPE
#include "fonts.h"
#include "fonts/fonts.h"
#endif
// Used for the last pass when rendering to the back buffer.

View File

@ -17,7 +17,7 @@
#define __GL_COMMON_H
#include "../general.h"
#include "fonts.h"
#include "fonts/fonts.h"
#ifdef HAVE_CONFIG_H
#include "../config.h"

View File

@ -1,32 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "gl_font.h"
void gl_init_font(gl_t *gl, const char *font_path, unsigned font_size)
{
gl_init_font_ctx(gl, font_path, font_size);
}
void gl_deinit_font(gl_t *gl)
{
gl_deinit_font_ctx(gl);
}
void gl_render_msg(gl_t *gl, const char *msg)
{
gl_render_msg_ctx(gl, msg);
}

View File

@ -26,7 +26,7 @@
#endif
#ifdef HAVE_FREETYPE
#include "fonts.h"
#include "fonts/fonts.h"
#endif
static void convert_15bit_15bit_direct(uint16_t *out, unsigned outpitch, const uint16_t *input, unsigned width, unsigned height, unsigned pitch, const SDL_PixelFormat *fmt);

View File

@ -20,7 +20,7 @@
#include <signal.h>
#include <math.h>
#ifdef HAVE_FREETYPE
#include "fonts.h"
#include "fonts/fonts.h"
#endif
#include "gfx_common.h"