1
1
/***************************************************************************
5
Wrappers for handling MAME configuration files
5
Wrappers for handling MAME configuration files
7
Copyright (c) 1996-2006, Nicola Salmoria and the MAME Team.
8
Visit http://mamedev.org for licensing and usage restrictions.
7
10
***************************************************************************/
16
/*************************************
20
*************************************/
22
int config_load(const struct InputPort *input_ports_default, struct InputPort *input_ports);
23
void config_save(const struct InputPort *input_ports_default, const struct InputPort *input_ports);
24
int config_load_default(const struct InputPortDefinition *input_ports_backup, struct InputPortDefinition *input_ports);
25
void config_save_default(const struct InputPortDefinition *input_ports_backup, const struct InputPortDefinition *input_ports);
26
int config_load_controller(const char *name, struct InputPortDefinition *input_ports);
23
/*************************************
27
*************************************/
29
#define CONFIG_TYPE_INIT 0 /* opportunity to initialize things first */
30
#define CONFIG_TYPE_CONTROLLER 1 /* loading from controller file */
31
#define CONFIG_TYPE_DEFAULT 2 /* loading from default.cfg */
32
#define CONFIG_TYPE_GAME 3 /* loading from game.cfg */
33
#define CONFIG_TYPE_FINAL 4 /* opportunity to finish initialization */
37
/*************************************
41
*************************************/
43
typedef void (*config_callback)(int config_type, xml_data_node *parentnode);
47
/*************************************
51
*************************************/
53
void config_init(void);
54
void config_register(const char *nodename, config_callback load, config_callback save);
55
int config_load_settings(void);
56
void config_save_settings(void);
58
#endif /* __CONFIG_H__ */