2023-02-24 15:24:59 +01:00
|
|
|
#ifndef SETTINGS_H__
|
|
|
|
#define SETTINGS_H__
|
|
|
|
|
|
|
|
#include "flashcart/flashcart.h"
|
|
|
|
#include "boot/boot.h"
|
|
|
|
|
|
|
|
#define SC64_SETTINGS_FILEPATH "sd://config.sc64.toml.txt"
|
|
|
|
#define SETTINGS_SCHEMA_VERSION 1
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
char *rom_path;
|
|
|
|
char *save_path;
|
2023-02-25 03:36:41 +01:00
|
|
|
flashcart_save_type_t save_type; //TODO: should this be converted from a string, or only use an integer value?
|
2023-02-24 15:24:59 +01:00
|
|
|
bool save_writeback; // TODO: this is likely SC64 specific.
|
|
|
|
} settings_last_rom_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
bool auto_load_last_rom;
|
2023-07-09 00:01:41 +02:00
|
|
|
char* directory;
|
2023-04-01 00:57:21 +02:00
|
|
|
// TODO:
|
|
|
|
// Menu layout: list vs grid
|
|
|
|
// Hide extensions
|
|
|
|
// Hide hidden files and dirs
|
|
|
|
// colour scheme
|
|
|
|
// background pic
|
2023-02-24 15:24:59 +01:00
|
|
|
} settings_last_state_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
settings_last_rom_t last_rom;
|
|
|
|
settings_last_state_t last_state;
|
|
|
|
boot_params_t boot_params;
|
|
|
|
} settings_t;
|
|
|
|
|
|
|
|
void settings_load_from_file (settings_t *settings);
|
2023-06-08 20:16:48 +02:00
|
|
|
void settings_save(const char* filename, const settings_t* settings);
|
2023-02-24 15:24:59 +01:00
|
|
|
void settings_reset (void);
|
|
|
|
void settings_load_default_state(settings_t *settings);
|
|
|
|
void settings_validate (void);
|
|
|
|
|
|
|
|
#endif
|