From 47ebf623cbfa46bd37456cce28a192471b46ddd5 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Sun, 29 Oct 2017 12:42:34 -0400 Subject: 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 --- apps/plugins/puzzles/rbmalloc.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'apps/plugins/puzzles/rbmalloc.c') diff --git a/apps/plugins/puzzles/rbmalloc.c b/apps/plugins/puzzles/rbmalloc.c index 5bf914ff87..1cb903ef4f 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; -- cgit v1.2.3