summaryrefslogtreecommitdiffstats
path: root/apps/plugins/pictureflow
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-06-03 00:54:53 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-06-03 00:54:53 +0000
commit19ac88475d051de2abe38247bcb8c307bad24d2e (patch)
treec57fbadbd38692a94eec4af61d618eff6cd81015 /apps/plugins/pictureflow
parentc8f22f5a8f831e4a95c493cf9b0c86a467364af0 (diff)
downloadrockbox-19ac88475d051de2abe38247bcb8c307bad24d2e.tar.gz
rockbox-19ac88475d051de2abe38247bcb8c307bad24d2e.tar.bz2
rockbox-19ac88475d051de2abe38247bcb8c307bad24d2e.zip
PictureFlow: subtract space used to load plugin from available audio buffer space if needed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21172 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pictureflow')
-rw-r--r--apps/plugins/pictureflow/pictureflow.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c
index 0e337ef63c..ef40ea6e28 100644
--- a/apps/plugins/pictureflow/pictureflow.c
+++ b/apps/plugins/pictureflow/pictureflow.c
@@ -2721,6 +2721,11 @@ enum plugin_status plugin_start(const void *parameter)
buf = rb->plugin_get_buffer(&buf_size);
#else
buf = rb->plugin_get_audio_buffer(&buf_size);
+ if ((uintptr_t)buf < (uintptr_t)plugin_start_addr)
+ {
+ uint32_t tmp_size = (uintptr_t)plugin_start_addr - (uintptr_t)buf;
+ buf_size = MIN(buf_size, tmp_size);
+ }
#endif
ret = main();
#ifdef HAVE_ADJUSTABLE_CPU_FREQ