diff options
author | Thomas Martitz <kugel@rockbox.org> | 2014-01-26 13:56:53 +0100 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2014-01-26 14:01:48 +0100 |
commit | 37be80a1a5eefd862f7ee132083723cef03ceb3c (patch) | |
tree | 521c648ceff493422893bcc7e432bd43de969e89 /firmware/export/font.h | |
parent | 8142c68bd294a43a9d615995850fe185baa53216 (diff) | |
download | rockbox-37be80a1a5eefd862f7ee132083723cef03ceb3c.tar.gz rockbox-37be80a1a5eefd862f7ee132083723cef03ceb3c.zip |
fonts: Fix regression(s) caused by c23ce62.
The builtin sysfont does not have an associated buflib_alloc_data
(because it's builtin right?). font_get_{width,bits} accessed a field of
it for all fonts which crashed on some systems but not on mine.
Solution: Move this field to struct font directly.
The cache size calculated was also busted.
Fixes FS#12944 and most likely FS#12938.
Change-Id: I32303c4335a12a6c421fdca34f7ece851aac12ca
Diffstat (limited to 'firmware/export/font.h')
-rw-r--r-- | firmware/export/font.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/firmware/export/font.h b/firmware/export/font.h index d19e0b87ad..ad72cb52c7 100644 --- a/firmware/export/font.h +++ b/firmware/export/font.h | |||
@@ -107,6 +107,7 @@ struct font { | |||
107 | unsigned char *buffer_position; /* position in the buffer */ | 107 | unsigned char *buffer_position; /* position in the buffer */ |
108 | unsigned char *buffer_end; /* end of the buffer */ | 108 | unsigned char *buffer_end; /* end of the buffer */ |
109 | size_t buffer_size; /* size of the buffer in bytes */ | 109 | size_t buffer_size; /* size of the buffer in bytes */ |
110 | bool disabled; /* font disabled (use blank as fallback if not in cache) */ | ||
110 | #ifndef __PCTOOL__ | 111 | #ifndef __PCTOOL__ |
111 | struct font_cache cache; | 112 | struct font_cache cache; |
112 | uint32_t file_width_offset; /* offset to file width data */ | 113 | uint32_t file_width_offset; /* offset to file width data */ |