OSCR
Open Source Cartridge Reader
Loading...
Searching...
No Matches
core-macros.h
1
2
#if !defined(OSCR_CORE_MACROS_H_)
3
#define OSCR_CORE_MACROS_H_
4
5
#include "macros.h"
6
7
#define OSCR_CORES(...) \
8
enum class CoreID : uint8_t\
9
{\
10
NONE,\
11
__VA_ARGS__\
12
}
13
14
#define REGISTER_CORE_MENU2(TITLE, MENU) \
15
{ \
16
.title = TITLE, \
17
.menu = &MENU, \
18
}
19
20
#define REGISTER_CORE_MENU3(ID, TITLE, MENU) \
21
{ \
22
.id = CoreID::ID, \
23
.title = TITLE, \
24
.menu = &MENU, \
25
}
26
27
#define REGISTER_CORE_ID2(TITLE, MENU)
28
29
#define REGISTER_CORE_ID3(ID, TITLE, MENU) ID,
30
31
#endif
/* OSCR_CORE_MACROS_H_ */
32
33
#if defined(OSCR_REGISTERING_CORE_IDS)
34
# define REGISTER_CORE(...) GET_MACRO_0_3(REGISTER_CORE_ID, __VA_ARGS__)
35
#elif defined(OSCR_REGISTERING_CORE_MENUS)
36
# define REGISTER_CORE(...) GET_MACRO_0_3(REGISTER_CORE_MENU, __VA_ARGS__)
37
#else
38
# define REGISTER_CORE(...)
39
#endif
include
core-macros.h
Generated by
1.14.0