Changeset 1043


Ignore:
Timestamp:
01/15/11 21:41:21 (2 years ago)
Author:
reyalP
Message:

fix ptp script support/status commands with lua ifdefs from ultimA in http://chdk.setepontos.com/index.php?topic=5793.msg59721#msg59721

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/ptp.c

    r1034 r1043  
    128128    case PTP_CHDK_ScriptSupport: 
    129129      ptp.num_param = 1; 
    130       ptp.param1 = PTP_CHDK_SCRIPT_SUPPORT_LUA; 
     130      ptp.param1 = 0; 
     131#ifdef OPT_LUA 
     132      ptp.param1 |= PTP_CHDK_SCRIPT_SUPPORT_LUA; 
     133#endif 
    131134      break; 
    132135    case PTP_CHDK_ScriptStatus: 
    133136      ptp.num_param = 1; 
    134137// TODO script_is_running should always be defined, just ret 0 if script disabled 
     138      ptp.param1 = 0; 
    135139#ifdef OPT_SCRIPTING 
    136       ptp.param1 = script_is_running()?PTP_CHDK_SCRIPT_STATUS_RUN:0; 
    137 #else 
    138       ptp.param1 = 0; 
     140      ptp.param1 |= script_is_running()?PTP_CHDK_SCRIPT_STATUS_RUN:0; 
    139141#endif 
    140142      break; 
Note: See TracChangeset for help on using the changeset viewer.