aboutsummaryrefslogtreecommitdiff
path: root/src/settings/inc/settings.h
blob: 25e73b9926afc3bca47a91271b46621487e25cb1 (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
#ifndef SETTINGS_H
#define SETTINGS_H

#include <settings/port.h>
#include <game.h>
#include <peripheral.h>
#include <stdbool.h>

#ifdef __cplusplus
extern "C"
{
#endif

struct settings
{
    short screen_w, screen_h;
    bool fullscreen;
    enum peripheral_type periph_type;
    int pad_i;
    char name[GAME_PLAYER_NAME_LEN];
};

struct settings_rt
{
    union peripheral *p;
};

int settings_load_ex(const char *path, struct settings *s);
int settings_apply(const struct settings *s, const struct settings_rt *r);
int settings_save_ex(const char *path, const struct settings *s);

#ifdef __cplusplus
}
#endif

#endif /* SETTINGS_H */