diff options
| author | Franklin Wei <git@fwei.tk> | 2017-10-29 12:42:34 -0400 |
|---|---|---|
| committer | Franklin Wei <git@fwei.tk> | 2017-10-29 12:49:39 -0400 |
| commit | 47ebf623cbfa46bd37456cce28a192471b46ddd5 (patch) | |
| tree | 9678921e3f66278bd7298ccbf38d85e7af5daf76 /apps/plugins/puzzles/rbmalloc.c | |
| parent | b2c470719a79f301ff4e9a6adcc5307ef47cfacf (diff) | |
| download | rockbox-47ebf623cbfa46bd37456cce28a192471b46ddd5.zip rockbox-47ebf623cbfa46bd37456cce28a192471b46ddd5.tar.gz rockbox-47ebf623cbfa46bd37456cce28a192471b46ddd5.tar.bz2 rockbox-47ebf623cbfa46bd37456cce28a192471b46ddd5.tar.xz | |
puzzles: improve zoom rendering
This adds colored font rendering, as well as a workaround for font
loading while zoomed. Additionally, the frontend has been modified to
match the new upstream API.
Change-Id: I8c3fe57e6854f176485bf792cf4778cd54a21674
Diffstat (limited to 'apps/plugins/puzzles/rbmalloc.c')
| -rw-r--r-- | apps/plugins/puzzles/rbmalloc.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/apps/plugins/puzzles/rbmalloc.c b/apps/plugins/puzzles/rbmalloc.c index 5bf914f..1cb903e 100644 --- a/apps/plugins/puzzles/rbmalloc.c +++ b/apps/plugins/puzzles/rbmalloc.c @@ -14,12 +14,9 @@ int allocs = 0; int frees = 0; -bool audiobuf_available = -#ifndef COMBINED - true; -#else - false; -#endif +/* We don't load as an overlay anymore, so the audiobuf should always + * be available. */ +bool audiobuf_available = true; static bool grab_audiobuf(void) { @@ -29,10 +26,23 @@ static bool grab_audiobuf(void) if(rb->audio_status()) rb->audio_stop(); - size_t sz, junk; + size_t sz; + void *audiobuf = rb->plugin_get_audio_buffer(&sz); extern char *giant_buffer; +#if 0 + /* Try aligning if tlsf crashes in add_new_area(). This is + * disabled now since things seem to work without it. */ + void *old = audiobuf; + + /* I'm sorry. */ + audiobuf = (void*)((int) audiobuf & ~0xff); + audiobuf += 0x100; + + sz -= audiobuf - old; +#endif + add_new_area(audiobuf, sz, giant_buffer); audiobuf_available = false; return true; |