//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //config_save //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ int config_save(char *filename) { config_file_out = config_open(filename, "wt"); if (config_file_out) { //Save plugin specific data plugin_save(); //Save module data module_save_list(); //Save agent type specific data agent_save(); //Save control type data AND control data control_save(); //Close the file fclose(config_file_out); if (0 == stricmp(config_path_mainscript, filename)) check_mainscript_filetime(); //Save the other files, too module_save_all(); return 0; } //Must have had an error if (!plugin_suppresserrors) MessageBox(NULL, "There was an error saving the configuration file.", szAppName, MB_OK|MB_SYSTEMMODAL); return 1; }
bool asic_save(emu_image *s) { s->deviceType = asic.deviceType; return backlight_save(s) && control_save(s) && cpu_save(s) && flash_save(s) && intrpt_save(s) && keypad_save(s) && lcd_save(s) && mem_save(s) && watchdog_save(s) && protect_save(s) && rtc_save(s) && sha256_save(s) && gpt_save(s) && usb_save(s) && cxxx_save(s) && dxxx_save(s) && exxx_save(s) && sched_save(s); }