mirror of https://github.com/mgba-emu/mgba.git
PSP2: Cleanup PGF fixes a bit
This commit is contained in:
parent
8862dc49aa
commit
da0e39bc59
|
@ -21,20 +21,14 @@ set(OBJCOPY_CMD ${OBJCOPY} -I binary -O elf32-littlearm -B arm)
|
|||
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
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/res)
|
||||
|
|
|
@ -5,12 +5,13 @@
|
|||
* 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 @@ void GUIFontDestroy(struct GUIFont* 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) {
|
||||
|
|
Loading…
Reference in New Issue