summaryrefslogtreecommitdiff
path: root/apps/plugins/goban/sgf_storage.c
diff options
context:
space:
mode:
authorMustapha Senhaji <moos@rockbox.org>2009-02-20 23:14:09 +0000
committerMustapha Senhaji <moos@rockbox.org>2009-02-20 23:14:09 +0000
commit37183be69ce68e3f9ecaf12ce668d7e21229d8f0 (patch)
tree8eb0cbff672d83e0089081ad83f283aa094bf298 /apps/plugins/goban/sgf_storage.c
parent00215348d0ee3c894707dab3c9f7288a0d93cd74 (diff)
downloadrockbox-37183be69ce68e3f9ecaf12ce668d7e21229d8f0.tar.gz
rockbox-37183be69ce68e3f9ecaf12ce668d7e21229d8f0.zip
FS#9901 by Joshua Simmons for the Goban plugin: Goban overlay for the Archos targets.
This is a first try to enable this plugin for low memory targets like our old archoses :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20069 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/goban/sgf_storage.c')
-rw-r--r--apps/plugins/goban/sgf_storage.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/plugins/goban/sgf_storage.c b/apps/plugins/goban/sgf_storage.c
index 8afc3ea80f..7ee0848543 100644
--- a/apps/plugins/goban/sgf_storage.c
+++ b/apps/plugins/goban/sgf_storage.c
@@ -326,7 +326,7 @@ setup_sgf (void)
326 326
327 if (total_storage_size < MIN_STORAGE_BUFFER_SIZE) 327 if (total_storage_size < MIN_STORAGE_BUFFER_SIZE)
328 { 328 {
329 rb->splash (2 * HZ, "Stopping music playback to get more space"); 329 rb->splash (1 * HZ, "Stopping music playback to get more space");
330 DEBUGF ("storage_buffer_size < MIN!!: %d\n", (int) total_storage_size); 330 DEBUGF ("storage_buffer_size < MIN!!: %d\n", (int) total_storage_size);
331 331
332 temp_buffer = rb->plugin_get_audio_buffer (&size); 332 temp_buffer = rb->plugin_get_audio_buffer (&size);
@@ -335,7 +335,7 @@ setup_sgf (void)
335 335
336 if (total_storage_size < MIN_STORAGE_BUFFER_SIZE) 336 if (total_storage_size < MIN_STORAGE_BUFFER_SIZE)
337 { 337 {
338 rb->splash (5 * HZ, "Low memory. Large files may not load."); 338 rb->splash (1 * HZ, "Low memory. Large files may not load.");
339 339
340 DEBUGF ("storage_buffer_size < MIN!!!!: %d\n", 340 DEBUGF ("storage_buffer_size < MIN!!!!: %d\n",
341 (int) total_storage_size); 341 (int) total_storage_size);
@@ -387,6 +387,15 @@ setup_storage_buffer (char *temp_buffer, size_t size)
387 unsigned int index = 0; 387 unsigned int index = 0;
388 int temp; 388 int temp;
389 389
390#if PLUGIN_BUFFER_SIZE < 0x10000 && !defined(SIMULATOR)
391 /* loaded as an overlay plugin, protect from overwriting ourselves */
392 if (plugin_start_addr >= (unsigned char *) temp_buffer &&
393 plugin_start_addr < (unsigned char *) temp_buffer + size)
394 {
395 size = plugin_start_addr - (unsigned char *) temp_buffer;
396 }
397#endif
398
390 while (1) 399 while (1)
391 { 400 {
392 if (index >= sizeof (storage_initialized) / 401 if (index >= sizeof (storage_initialized) /