aboutsummaryrefslogtreecommitdiff
path: root/overrides.h
blob: fd1f9c232a081d5dc614b386726821d9af187035 (plain)
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
#ifndef _OVERRIDES_H__
#define _OVERRIDES_H__

#include "libpicofe/menu.h"
#include "libretro.h"

struct core_override_option {
	const char *key;
	const char *desc;
	const char *info;
	const bool blocked;
	const char *default_value;
	const char *retro_var_value;
	struct retro_core_option_value options[RETRO_NUM_CORE_OPTION_VALUES_MAX];
};

struct core_override_fast_forward {
	const char *type_key;
	const char *type_value;
	const char *interval_key;
	const char *interval_value;
};

struct core_override_startup_msg {
	const char *msg;
	const unsigned msec;
};

struct core_override {
	const char *core_name;
	const struct core_override_fast_forward *fast_forward;
	const struct core_override_startup_msg *startup_msg;
	me_bind_action* actions;
	const size_t action_size;
	me_bind_action* emu_actions;
	const size_t emu_action_size;
	const struct core_override_option* options;
	int block_load_content;
};

#define CORE_OVERRIDE(override, key, fallback) ((override && override->key) ? (override->key) : (fallback))

const struct core_override *get_overrides(void);
void set_overrides(const char *core_name);

#endif