summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/config.h')
-rw-r--r--src/emu/config.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/emu/config.h b/src/emu/config.h
new file mode 100644
index 00000000000..31411684419
--- /dev/null
+++ b/src/emu/config.h
@@ -0,0 +1,58 @@
+/***************************************************************************
+
+ config.h
+
+ Wrappers for handling MAME configuration files
+
+ Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+***************************************************************************/
+
+#pragma once
+
+#ifndef __CONFIG_H__
+#define __CONFIG_H__
+
+#include "mame.h"
+#include "input.h"
+#include "xmlfile.h"
+
+
+
+/*************************************
+ *
+ * Constants
+ *
+ *************************************/
+
+#define CONFIG_TYPE_INIT 0 /* opportunity to initialize things first */
+#define CONFIG_TYPE_CONTROLLER 1 /* loading from controller file */
+#define CONFIG_TYPE_DEFAULT 2 /* loading from default.cfg */
+#define CONFIG_TYPE_GAME 3 /* loading from game.cfg */
+#define CONFIG_TYPE_FINAL 4 /* opportunity to finish initialization */
+
+
+
+/*************************************
+ *
+ * Type definitions
+ *
+ *************************************/
+
+typedef void (*config_callback)(int config_type, xml_data_node *parentnode);
+
+
+
+/*************************************
+ *
+ * Function prototypes
+ *
+ *************************************/
+
+void config_init(running_machine *machine);
+void config_register(const char *nodename, config_callback load, config_callback save);
+int config_load_settings(void);
+void config_save_settings(void);
+
+#endif /* __CONFIG_H__ */