summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/config.h
blob: 6460e4ae9eb0d9eab939a007f0f607845f96a2cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/***************************************************************************

    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
 *
 *************************************/

enum
{
	CONFIG_TYPE_INIT = 0,					/* opportunity to initialize things first */
	CONFIG_TYPE_CONTROLLER,					/* loading from controller file */
	CONFIG_TYPE_DEFAULT,					/* loading from default.cfg */
	CONFIG_TYPE_GAME,					/* loading from game.cfg */
	CONFIG_TYPE_FINAL					/* 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__ */