- Timestamp:
- 04/22/12 09:06:47 (14 months ago)
- Location:
- trunk/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/gui.c
r1801 r1823 2086 2086 2087 2087 //------------------------------------------------------------------- 2088 // Flag to tell SpyTask to unload GUI menu modules 2089 static int unload_gui_modules = 0; 2090 2091 // Unload GUI menu modules in SpyTask 2092 void gui_kbd_unload_modules() 2093 { 2094 if (unload_gui_modules) 2095 { 2096 // Unload all modules which are marked as safe to unload, or loaded for menus 2097 gui_menu_unload_module_menus(); 2098 module_async_unload_allrunned(0); 2099 unload_gui_modules = 0; 2100 } 2101 } 2102 2088 2103 void gui_kbd_leave() 2089 2104 { … … 2100 2115 gui_set_mode(&defaultGuiHandler); 2101 2116 2102 // Unload all modules which are marked as safe to unload, or loaded for menus 2103 gui_menu_unload_module_menus(); 2104 module_async_unload_allrunned(0); 2117 // This is called from the keyboard task 2118 // Flag any modules loaded via menus or gui to be unloaded in SpyTask 2119 // Unloading them here can lead to conflicts and crashes 2120 unload_gui_modules = 1; 2105 2121 2106 2122 conf_update_prevent_shutdown(); -
trunk/core/main.c
r1719 r1823 241 241 242 242 #ifdef OPT_SCRIPTING 243 if (conf.script_startup==1) script_autostart(); // remote autostart243 if (conf.script_startup==1) script_autostart(); // remote autostart 244 244 if (conf.script_startup==2) { 245 245 conf.script_startup=0; … … 249 249 #endif 250 250 251 while (1){ 251 while (1) 252 { 252 253 253 254 #ifdef CAM_LOAD_CUSTOM_COLORS … … 255 256 #endif 256 257 257 if (raw_data_available) { 258 if (raw_data_available) 259 { 258 260 raw_need_postprocess = raw_savefile(); 259 261 hook_raw_save_complete(); … … 271 273 } 272 274 275 // Unload any GUI menu modules 276 extern void gui_kbd_unload_modules(); 277 gui_kbd_unload_modules(); 278 273 279 if (state_shooting_progress != SHOOTING_PROGRESS_PROCESSING) 274 280 { … … 277 283 278 284 #ifdef OPT_EDGEOVERLAY 279 if(((gui_get_mode()==GUI_MODE_NONE) || (gui_get_mode()==GUI_MODE_ALT)) && conf.edge_overlay_thresh && conf.edge_overlay_enable) { 280 281 // We need to skip first tick because stability 282 static int skip_counter=1; 283 284 if (skip_counter>0) { 285 skip_counter--; 286 } 287 else if (module_edgeovr_load()) { 288 libedgeovr->edge_overlay(); 289 } 290 } 285 if(((gui_get_mode()==GUI_MODE_NONE) || (gui_get_mode()==GUI_MODE_ALT)) && conf.edge_overlay_thresh && conf.edge_overlay_enable) 286 { 287 // We need to skip first tick because stability 288 static int skip_counter=1; 289 290 if (skip_counter>0) 291 { 292 skip_counter--; 293 } 294 else if (module_edgeovr_load()) 295 { 296 libedgeovr->edge_overlay(); 297 } 298 } 291 299 #endif 292 300 } 293 301 294 if ((state_shooting_progress == SHOOTING_PROGRESS_PROCESSING) && (!shooting_in_progress())) { 302 if ((state_shooting_progress == SHOOTING_PROGRESS_PROCESSING) && (!shooting_in_progress())) 303 { 295 304 state_shooting_progress = SHOOTING_PROGRESS_DONE; 296 305 if (raw_need_postprocess) raw_postprocess(); … … 303 312 #endif 304 313 305 // Process async module unload requests306 module_tick_unloader();314 // Process async module unload requests 315 module_tick_unloader(); 307 316 308 317 msleep(20); 309 chdk_started_flag=1;318 chdk_started_flag=1; 310 319 } 311 320 }
Note: See TracChangeset
for help on using the changeset viewer.