12. Show and erase RAW in review mode
So the idea is, when in review mode:
- to display in OSD if there is a RAW file corresponding to the current viewed JPG
- to allow in alt-mode RAW deletion (disp button), but also navigation between pictures (left/right) and jpg deletion (bottom) like outside alt-mode
platform/ixus70_sd1000/sub/102a/stubs_min.S:15
+DEF(review_file,0xF640)
include/platform.h:58
+extern char review_file;
core/raw.h:28
+extern static char prefixes[][4];
+extern static char exts[][4];
core/raw.c:16
-static char raw_prefixes[][4] = { "IMG", "CRW", "SND" };
-static char raw_exts[][4] = { "JPG", "CRW", "CR2", "THM", "WAV" };
+char raw_prefixes[][4] = { "IMG", "CRW", "SND" };
+char raw_exts[][4] = { "JPG", "CRW", "CR2", "THM", "WAV" };
gui_osd.h:61
+extern char* gui_raw_file;
+extern int gui_raw_exists;
gui_osd.c:24
+char gui_raw_file[64] = "";
+int gui_raw_exists = 0;
core/gui_osd.c:15
+#include "raw.h"
core/gui_osd.c:691
+void gui_osd_draw_raw_file()
+{
+ int pos, fd;
+
+ strncpy(gui_raw_file, &review_file, 64);
+ if (gui_raw_file[63] != 0) return;
+ pos = strlen(gui_raw_file);
+ strncpy(gui_raw_file+pos-12, raw_prefixes[conf.raw_prefix], 3);
+ strncpy(gui_raw_file+pos-3, raw_exts[conf.raw_ext], 3);
+ if (!conf.raw_in_dir) strncpy(gui_raw_file+7, "100", 3);
+ fd = open(gui_raw_file, O_RDONLY, 0777);
+ if (fd >= 0)
+ {
+ gui_raw_exists = 1;
+ close(fd);
+ draw_string(conf.mode_raw_pos.x, conf.mode_raw_pos.y, "RAW pic", conf.osd_color_warn);
+ } else
+ {
+ draw_string(conf.mode_raw_pos.x, conf.mode_raw_pos.y, "", conf.osd_color_warn);
+ gui_raw_exists = 0;
+ }
+}
core/gui.c:2032,gui_draw_osd
+ if ((m&MODE_MASK) == MODE_PLAY && conf.show_raw_state && !mode_video)
+ gui_osd_draw_raw_file();
+
if ((m&MODE_MASK) == MODE_REC && (recreview_hold==0 || conf.show_osd_in_review) ) {
core/gui.c:1671
+static void gui_delete_raw_selected(unsigned int btn)
+{
+ if (btn == MBOX_BTN_YES)
+ {
+ if (gui_raw_exists) remove(gui_raw_file);
+ }
+}
core/gui.c:1751,gui_kbd_process
case GUI_MODE_ALT:
+ if ((mode_get()&MODE_MASK) == MODE_PLAY)
+ {
+ if (kbd_is_key_clicked(KEY_LEFT))
+ { kbd_key_press(KEY_LEFT); pressed_key = KEY_LEFT; } else
+ if (kbd_is_key_clicked(KEY_RIGHT))
+ { kbd_key_press(KEY_RIGHT); pressed_key = KEY_RIGHT; } else
+ if (kbd_is_key_clicked(KEY_DOWN))
+ { kbd_key_press(KEY_DOWN); pressed_key = KEY_DOWN; } else
+ if (kbd_is_key_clicked(KEY_UP))
+ { kbd_key_press(KEY_UP); pressed_key = KEY_UP; } else
+ if (kbd_is_key_clicked(KEY_SET))
+ { kbd_key_press(KEY_SET); pressed_key = KEY_SET; } else
+ if (kbd_is_key_clicked(KEY_DISPLAY))
+ {
+ gui_mbox_init(LANG_MSG_DELETE_RAW, (int)"", MBOX_FUNC_RESTORE|MBOX_BTN_YES_NO, &gui_delete_raw_selected);
+ }
+ } else {
if (kbd_is_key_clicked(SHORTCUT_TOGGLE_RAW)) {
core/gui.c:1862,kbd_key_processed
}
+ }
break;
case GUI_MODE_MENU:
core/gui_lang.h:488
+#define LANG_MSG_DELETE_RAW 384
core/gui_lang.h:492
-#define GUI_LANG_ITEMS 383
+#define GUI_LANG_ITEMS 384
core/gui_lang.c:502
+"384 \"Delete RAW?\"\n"
So only the current viewed file name address is maybe platform dependant... Are there RAM dumps available for all platforms?