summaryrefslogtreecommitdiff
path: root/apps/plugins/goban/sgf_storage.c
diff options
context:
space:
mode:
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) /