diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/iriver_flash.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c index aa1bdb62b8..9d1c3456a6 100644 --- a/apps/plugins/iriver_flash.c +++ b/apps/plugins/iriver_flash.c | |||
@@ -701,11 +701,12 @@ int load_romdump(const char *filename) | |||
701 | } | 701 | } |
702 | 702 | ||
703 | /* Kind of our main function, defines the application flow. */ | 703 | /* Kind of our main function, defines the application flow. */ |
704 | void DoUserDialog(char* filename) | 704 | static void DoUserDialog(const char* filename) |
705 | { | 705 | { |
706 | /* this can only work if Rockbox runs in DRAM, not flash ROM */ | 706 | /* check whether we're running from ROM */ |
707 | if ((uint16_t*)rb >= FB && (uint16_t*)rb < FB + 4096*1024) /* 4 MB max */ | 707 | uint16_t* RB = (uint16_t*) rb; |
708 | { /* we're running from flash */ | 708 | if (RB >= FB && RB < FB + (FLASH_SIZE / sizeof(*FB))) |
709 | { | ||
709 | rb->splash(HZ*3, "Not from ROM"); | 710 | rb->splash(HZ*3, "Not from ROM"); |
710 | return; /* exit */ | 711 | return; /* exit */ |
711 | } | 712 | } |
@@ -717,14 +718,13 @@ void DoUserDialog(char* filename) | |||
717 | return; /* exit */ | 718 | return; /* exit */ |
718 | } | 719 | } |
719 | 720 | ||
720 | rb->lcd_setfont(FONT_SYSFIXED); | ||
721 | if (!show_info()) | 721 | if (!show_info()) |
722 | return ; | 722 | return; /* exit */ |
723 | 723 | ||
724 | if (filename == NULL) | 724 | if (filename == NULL) |
725 | { | 725 | { |
726 | rb->splash(HZ*3, "Please use this plugin with \"Open with...\""); | 726 | rb->splash(HZ*3, "Please use this plugin with \"Open with...\""); |
727 | return ; | 727 | return; /* exit */ |
728 | } | 728 | } |
729 | 729 | ||
730 | audiobuf = rb->plugin_get_audio_buffer((size_t *)&audiobuf_size); | 730 | audiobuf = rb->plugin_get_audio_buffer((size_t *)&audiobuf_size); |
@@ -752,7 +752,9 @@ enum plugin_status plugin_start(const void* parameter) | |||
752 | 752 | ||
753 | /* now go ahead and have fun! */ | 753 | /* now go ahead and have fun! */ |
754 | oldmode = rb->system_memory_guard(MEMGUARD_NONE); /*disable memory guard */ | 754 | oldmode = rb->system_memory_guard(MEMGUARD_NONE); /*disable memory guard */ |
755 | DoUserDialog((char*) parameter); | 755 | rb->lcd_setfont(FONT_SYSFIXED); |
756 | DoUserDialog(parameter); | ||
757 | rb->lcd_setfont(FONT_UI); | ||
756 | rb->system_memory_guard(oldmode); /* re-enable memory guard */ | 758 | rb->system_memory_guard(oldmode); /* re-enable memory guard */ |
757 | 759 | ||
758 | return PLUGIN_OK; | 760 | return PLUGIN_OK; |