recovery: Support board-specified font sizes and font-files
This, for example, is for an LDPI device: BOARD_RECOVERY_FONT_INCLUDE_HEADER := ../../device/geeksphone/one/font_7x16.h BOARD_RECOVERY_FONT_WIDTH := 7 BOARD_RECOVERY_FONT_HEIGHT := 16 Change-Id: I71d2f420b9668b5767c9b0b5d90e3e523c56e873
This commit is contained in:
parent
37d96f7414
commit
9acb022ab8
@ -50,7 +50,7 @@ LOCAL_CFLAGS += -DRECOVERY_VERSION="$(RECOVERY_VERSION)"
|
||||
RECOVERY_API_VERSION := 2
|
||||
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
|
||||
|
||||
BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_SDCARD_DEVICE_PRIMARY BOARD_SDCARD_DEVICE_SECONDARY BOARD_SDEXT_DEVICE BOARD_SDEXT_FILESYSTEM BOARD_DATA_DEVICE BOARD_DATA_FILESYSTEM BOARD_DATADATA_DEVICE BOARD_DATADATA_FILESYSTEM BOARD_CACHE_DEVICE BOARD_CACHE_FILESYSTEM BOARD_SYSTEM_DEVICE BOARD_SYSTEM_FILESYSTEM BOARD_HAS_DATADATA BOARD_DATA_FILESYSTEM_OPTIONS BOARD_DATADATA_FILESYSTEM_OPTIONS BOARD_CACHE_FILESYSTEM_OPTIONS BOARD_SYSTEM_FILESYSTEM_OPTIONS BOARD_HAS_MTD_CACHE BOARD_USES_BMLUTILS BOARD_USES_MMCUTILS BOARD_HAS_SMALL_RECOVERY
|
||||
BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_SDCARD_DEVICE_PRIMARY BOARD_SDCARD_DEVICE_SECONDARY BOARD_SDEXT_DEVICE BOARD_SDEXT_FILESYSTEM BOARD_DATA_DEVICE BOARD_DATA_FILESYSTEM BOARD_DATADATA_DEVICE BOARD_DATADATA_FILESYSTEM BOARD_CACHE_DEVICE BOARD_CACHE_FILESYSTEM BOARD_SYSTEM_DEVICE BOARD_SYSTEM_FILESYSTEM BOARD_HAS_DATADATA BOARD_DATA_FILESYSTEM_OPTIONS BOARD_DATADATA_FILESYSTEM_OPTIONS BOARD_CACHE_FILESYSTEM_OPTIONS BOARD_SYSTEM_FILESYSTEM_OPTIONS BOARD_HAS_MTD_CACHE BOARD_USES_BMLUTILS BOARD_USES_MMCUTILS BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY
|
||||
|
||||
$(foreach board_define,$(BOARD_RECOVERY_DEFINES), \
|
||||
$(if $($(board_define)), \
|
||||
|
@ -7,6 +7,10 @@ LOCAL_C_INCLUDES +=\
|
||||
external/libpng\
|
||||
external/zlib
|
||||
|
||||
ifneq ($(BOARD_LDPI_RECOVERY),)
|
||||
LOCAL_CFLAGS += -DBOARD_LDPI_RECOVERY='"$(BOARD_LDPI_RECOVERY)"'
|
||||
endif
|
||||
|
||||
LOCAL_MODULE := libminui
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
@ -29,7 +29,12 @@
|
||||
|
||||
#include <pixelflinger/pixelflinger.h>
|
||||
|
||||
#include "font_10x18.h"
|
||||
#ifndef BOARD_LDPI_RECOVERY
|
||||
#include "font_10x18.h"
|
||||
#else
|
||||
#include "font_7x16.h"
|
||||
#endif
|
||||
|
||||
#include "minui.h"
|
||||
|
||||
typedef struct {
|
||||
|
9
ui.c
9
ui.c
@ -41,8 +41,13 @@ static int gShowBackButton = 0;
|
||||
#define MENU_MAX_COLS 64
|
||||
#define MENU_MAX_ROWS 250
|
||||
|
||||
#define CHAR_WIDTH 10
|
||||
#define CHAR_HEIGHT 18
|
||||
#ifndef BOARD_LDPI_RECOVERY
|
||||
#define CHAR_WIDTH 10
|
||||
#define CHAR_HEIGHT 18
|
||||
#else
|
||||
#define CHAR_WIDTH 7
|
||||
#define CHAR_HEIGHT 16
|
||||
#endif
|
||||
|
||||
#define PROGRESSBAR_INDETERMINATE_STATES 6
|
||||
#define PROGRESSBAR_INDETERMINATE_FPS 15
|
||||
|
Loading…
Reference in New Issue
Block a user