Ignore:
Timestamp:
01/08/12 12:12:13 (17 months ago)
Author:
philmoz
Message:

Re-work of new module system for review.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/reyalp-flt/core/conf.c

    r1516 r1534  
    77#include "raw.h" 
    88#include "modules.h" 
     9#include "module_load.h" 
    910#include "gui_draw.h" 
    1011#include "gui_osd.h" 
     
    3839 
    3940//------------------------------------------------------------------- 
    40 Conf conf; 
     41Conf conf = { MAKE_API_VERSION(1,0) }; 
    4142 
    4243int state_shooting_progress = SHOOTING_PROGRESS_NONE; 
     
    6970static void conf_change_menu_symbol_rbf_file(); 
    7071static void conf_change_alt_mode_button(); 
    71 static void conf_change_grid_file(); 
    7272static void conf_change_video_bitrate(); 
    7373static void conf_change_dng_ext(); 
     
    148148/* !!! Do NOT change ID for items defined already! Append a new one at the end! !!! */ 
    149149    CONF_INFO(  1, conf.show_osd,               CONF_DEF_VALUE, i:1, NULL), 
    150     CONF_INFO(  2, conf.save_raw,               CONF_DEF_VALUE, i:0, NULL), 
     150    CONF_INFO(  2, conf.save_raw,               CONF_DEF_VALUE, i:0, conf_change_dng), 
    151151    CONF_INFO(  3, conf.script_shoot_delay,     CONF_DEF_VALUE, i:0, NULL), 
    152152    CONF_INFO(  4, conf.show_histo,             CONF_DEF_VALUE, i:0, NULL), 
     
    216216    CONF_INFO( 67, conf.alt_prevent_shutdown,   CONF_DEF_VALUE, i:ALT_PREVENT_SHUTDOWN_ALT, conf_update_prevent_shutdown), 
    217217    CONF_INFO( 68, conf.show_grid_lines,        CONF_DEF_VALUE, i:0, NULL), 
    218     CONF_INFO( 69, conf.grid_lines_file,        CONF_CHAR_PTR,   ptr:"", conf_change_grid_file), 
     218    CONF_INFO( 69, conf.grid_lines_file,        CONF_CHAR_PTR,   ptr:"", NULL), 
    219219    CONF_INFO( 70, conf.raw_nr,                 CONF_DEF_VALUE, i:NOISE_REDUCTION_AUTO_CANON, NULL), 
    220220    CONF_INFO( 71, conf.grid_force_color,       CONF_DEF_VALUE, i:0, NULL), 
     
    426426    case  66: conf_change_menu_rbf_file(); break; 
    427427    case  67: conf_update_prevent_shutdown(); break; 
    428     case  69: conf_change_grid_file(); break; 
    429428    case 101: conf_change_video_bitrate(); break; 
    430429    case 183: conf_change_menu_symbol_rbf_file(); break; 
    431430    case 194: conf_change_script_file(); break; 
     431    case 2: 
    432432    case 226: conf_change_dng(); break; 
    433433    case 235: conf_change_dng_ext(); break; 
     
    477477} 
    478478 
    479 static void conf_change_grid_file() { 
    480     grid_lines_load(conf.grid_lines_file); 
    481 } 
    482  
    483479static void conf_change_video_bitrate() { 
    484480    shooting_video_bitrate_change(conf.video_bitrate); 
     
    487483void conf_change_dng(void){ 
    488484#if DNG_SUPPORT 
    489  if (conf.dng_raw) { 
     485 if (conf.save_raw && conf.dng_raw) { 
    490486        if ( !module_dng_load(LIBDNG_OWNED_BY_RAW) ) 
    491487                return; 
     
    668664                   memcpy(conf_info[i].var, buf+offs, size); 
    669665                   conf_info_func(conf_info[i].id); 
    670                    //if (conf_info[i].func) { 
    671                    //    conf_info[i].func(); 
    672                    //} 
    673666                } 
    674667                offs += size; 
Note: See TracChangeset for help on using the changeset viewer.