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