Changeset 1569 for trunk/core/luascript.c
- Timestamp:
- 01/16/12 08:22:51 (17 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
core/luascript.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/reyalp-flt merged: 1527-1568
- Property svn:mergeinfo changed
-
trunk/core/luascript.c
r1527 r1569 14 14 #include "console.h" 15 15 #include "action_stack.h" 16 #include "motion_detector.h"17 16 #include "ptp.h" 18 17 #include "core.h" … … 779 778 static int luaCB_md_get_cell_diff( lua_State* L ) 780 779 { 781 lua_pushnumber( L, md_get_cell_diff(luaL_checknumber(L,1), 782 luaL_checknumber(L,2))); 783 return 1; 780 if (module_mdetect_load()) 781 lua_pushnumber( L, libmotiondetect->md_get_cell_diff(luaL_checknumber(L,1), luaL_checknumber(L,2))); 782 else 783 lua_pushnumber( L, 0 ); 784 return 1; 784 785 } 785 786 … … 803 804 int pixels_step = (luaL_optnumber(L,15,6)); 804 805 int msecs_before_trigger = (luaL_optnumber(L,16,0)); 805 if (md_init_motion_detector(806 if (module_mdetect_load() && libmotiondetect->md_init_motion_detector( 806 807 columns, rows, pixel_measure_mode, detection_timeout, 807 808 measure_interval, threshold, draw_grid, … … 825 826 kbd_reset_autoclicked_key(); 826 827 828 // Push selected file as script return value 827 829 lua_pushstring( Lt, (fn && fn[0])? fn : NULL ); 828 829 830 } 830 831
Note: See TracChangeset
for help on using the changeset viewer.