N64FlashcartMenu/src/menu/settings.h

39 lines
959 B
C
Raw Normal View History

2023-02-24 15:24:59 +01:00
#ifndef SETTINGS_H__
#define SETTINGS_H__
#include "flashcart/flashcart.h"
#include "libs/toml/toml.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;
flashcart_save_type_t save_type; //TODO: should this be converted from a string, or use an integer value?
bool save_writeback; // TODO: this is likely SC64 specific.
} settings_last_rom_t;
typedef struct {
bool auto_load_last_rom;
char* current_directory;
} 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);
void settings_save (void);
void settings_reset (void);
void settings_load_default_state(settings_t *settings);
void settings_save_default_state(void);
void settings_validate (void);
#endif