all repos — mgba @ 81b85d1843a2e32aab25fd79e9da236e27619436

mGBA Game Boy Advance Emulator

src/gba/gba-config.h (view raw)

 1#ifndef GBA_CONFIG_H
 2#define GBA_CONFIG_H
 3
 4#include "util/common.h"
 5
 6#include "util/configuration.h"
 7
 8struct GBAConfig {
 9	struct Configuration configTable;
10	struct Configuration defaultsTable;
11	char* port;
12};
13
14struct GBAOptions {
15	char* bios;
16	int logLevel;
17	int frameskip;
18	int rewindBufferCapacity;
19	int rewindBufferInterval;
20	float fpsTarget;
21	size_t audioBuffers;
22
23	int fullscreen;
24	int width;
25	int height;
26
27	bool videoSync;
28	bool audioSync;
29};
30
31void GBAConfigInit(struct GBAConfig*, const char* port);
32void GBAConfigDeinit(struct GBAConfig*);
33
34bool GBAConfigLoad(struct GBAConfig*);
35bool GBAConfigSave(const struct GBAConfig*);
36
37const char* GBAConfigGetValue(const struct GBAConfig*, const char* key);
38
39void GBAConfigSetValue(struct GBAConfig*, const char* key, const char* value);
40void GBAConfigSetIntValue(struct GBAConfig*, const char* key, int value);
41void GBAConfigSetUIntValue(struct GBAConfig*, const char* key, unsigned value);
42void GBAConfigSetFloatValue(struct GBAConfig*, const char* key, float value);
43
44void GBAConfigSetDefaultValue(struct GBAConfig*, const char* key, const char* value);
45void GBAConfigSetDefaultIntValue(struct GBAConfig*, const char* key, int value);
46void GBAConfigSetDefaultUIntValue(struct GBAConfig*, const char* key, unsigned value);
47void GBAConfigSetDefaultFloatValue(struct GBAConfig*, const char* key, float value);
48
49void GBAConfigMap(const struct GBAConfig* config, struct GBAOptions* opts);
50void GBAConfigLoadDefaults(struct GBAConfig* config, const struct GBAOptions* opts);
51
52void GBAConfigFreeOpts(struct GBAOptions* opts);
53
54#endif