all repos — mgba @ da0e39bc596022346881fce3f1584d8adb8054e0

mGBA Game Boy Advance Emulator

PSP2: Cleanup PGF fixes a bit
Jeffrey Pfau jeffrey@endrift.com
Fri, 29 Jul 2016 21:59:37 -0700
commit

da0e39bc596022346881fce3f1584d8adb8054e0

parent

8862dc49aa03691b5cbd614dde1a99420d555cbd

2 files changed, 3 insertions(+), 8 deletions(-)

jump to
M src/platform/psp2/CMakeLists.txtsrc/platform/psp2/CMakeLists.txt

@@ -21,19 +21,13 @@

list(APPEND GUI_SRC ${CMAKE_CURRENT_SOURCE_DIR}/gui-font.c) set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/icons.o - ${CMAKE_CURRENT_BINARY_DIR}/font.o ${CMAKE_CURRENT_BINARY_DIR}/backdrop.o PROPERTIES GENERATED ON) add_executable(${BINARY_NAME}.elf ${PLATFORM_SRC} ${GUI_SRC} main.c ${CMAKE_CURRENT_BINARY_DIR}/icons.o - ${CMAKE_CURRENT_BINARY_DIR}/font.o ${CMAKE_CURRENT_BINARY_DIR}/backdrop.o) set_target_properties(${BINARY_NAME}.elf PROPERTIES COMPILE_DEFINITIONS "${OS_DEFINES};${FEATURE_DEFINES};${FUNCTION_DEFINES}") target_link_libraries(${BINARY_NAME}.elf ${BINARY_NAME} ${OS_LIB}) - -add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/font.o - COMMAND ${OBJCOPY_CMD} font2x.png ${CMAKE_CURRENT_BINARY_DIR}/font.o - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/res) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/icons.o COMMAND ${OBJCOPY_CMD} icons2x.png ${CMAKE_CURRENT_BINARY_DIR}/icons.o
M src/platform/psp2/gui-font.csrc/platform/psp2/gui-font.c

@@ -5,12 +5,13 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this

* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "util/gui/font.h" #include "util/gui/font-metrics.h" +#include "util/string.h" #include <vita2d.h> #define CELL_HEIGHT 32 #define CELL_WIDTH 32 -#define FONT_SIZE 1.2f +#define FONT_SIZE 1.25f extern const uint8_t _binary_icons2x_png_start[];

@@ -36,7 +37,7 @@ free(font);

} unsigned GUIFontHeight(const struct GUIFont* font) { - return vita2d_pgf_text_height(font->pgf, FONT_SIZE, "M") + 8; + return vita2d_pgf_text_height(font->pgf, FONT_SIZE, "M") + 9; } unsigned GUIFontGlyphWidth(const struct GUIFont* font, uint32_t glyph) {