mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2024-12-02 23:34:15 +01:00
39 lines
959 B
C
39 lines
959 B
C
|
#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
|