mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2025-04-05 23:56:53 +02:00
Default menu sound fx to off
Rename functions to better describe them.
This commit is contained in:
parent
e14ea9c946
commit
0068699fec
@ -91,7 +91,7 @@ static void menu_init (boot_params_t *boot_params) {
|
||||
|
||||
path_free(path);
|
||||
|
||||
sound_use_sfx(menu->settings.sound_enabled);
|
||||
sound_use_sfx(menu->settings.soundfx_enabled);
|
||||
|
||||
menu->browser.directory = path_init(menu->storage_prefix, menu->settings.default_directory);
|
||||
if (!directory_exists(path_get(menu->browser.directory))) {
|
||||
|
@ -13,7 +13,7 @@ static settings_t init = {
|
||||
.show_protected_entries = false,
|
||||
.default_directory = "/",
|
||||
.use_saves_folder = true,
|
||||
.sound_enabled = true,
|
||||
.soundfx_enabled = false,
|
||||
.rom_autoload_enabled = false,
|
||||
.rom_autoload_path = "",
|
||||
.rom_autoload_filename = "",
|
||||
@ -42,7 +42,7 @@ void settings_load (settings_t *settings) {
|
||||
settings->show_protected_entries = mini_get_bool(ini, "menu", "show_protected_entries", init.show_protected_entries);
|
||||
settings->default_directory = strdup(mini_get_string(ini, "menu", "default_directory", init.default_directory));
|
||||
settings->use_saves_folder = mini_get_bool(ini, "menu", "use_saves_folder", init.use_saves_folder);
|
||||
settings->sound_enabled = mini_get_bool(ini, "menu", "sound_enabled", init.sound_enabled);
|
||||
settings->soundfx_enabled = mini_get_bool(ini, "menu", "soundfx_enabled", init.soundfx_enabled);
|
||||
|
||||
settings->rom_autoload_enabled = mini_get_bool(ini, "menu", "autoload_rom_enabled", init.rom_autoload_enabled);
|
||||
settings->rom_autoload_path = strdup(mini_get_string(ini, "autoload", "rom_path", init.rom_autoload_path));
|
||||
@ -62,7 +62,7 @@ void settings_save (settings_t *settings) {
|
||||
mini_set_bool(ini, "menu", "show_protected_entries", settings->show_protected_entries);
|
||||
mini_set_string(ini, "menu", "default_directory", settings->default_directory);
|
||||
mini_set_bool(ini, "menu", "use_saves_folder", settings->use_saves_folder);
|
||||
mini_set_bool(ini, "menu", "sound_enabled", settings->sound_enabled);
|
||||
mini_set_bool(ini, "menu", "soundfx_enabled", settings->soundfx_enabled);
|
||||
mini_set_bool(ini, "menu", "autoload_rom_enabled", settings->rom_autoload_enabled);
|
||||
mini_set_string(ini, "autoload", "rom_path", settings->rom_autoload_path);
|
||||
mini_set_string(ini, "autoload", "rom_filename", settings->rom_autoload_filename);
|
||||
|
@ -26,7 +26,7 @@ typedef struct {
|
||||
bool bgm_enabled;
|
||||
|
||||
/** @brief Enable Sounds */
|
||||
bool sound_enabled;
|
||||
bool soundfx_enabled;
|
||||
|
||||
/** @brief Enable rumble feedback */
|
||||
bool rumble_enabled;
|
||||
|
@ -23,9 +23,9 @@ static void set_use_saves_folder_type (menu_t *menu, void *arg) {
|
||||
settings_save(&menu->settings);
|
||||
}
|
||||
|
||||
static void set_sound_enabled_type (menu_t *menu, void *arg) {
|
||||
menu->settings.sound_enabled = (bool)(uintptr_t)(arg);
|
||||
sound_use_sfx(menu->settings.sound_enabled);
|
||||
static void set_soundfx_enabled_type (menu_t *menu, void *arg) {
|
||||
menu->settings.soundfx_enabled = (bool)(uintptr_t)(arg);
|
||||
sound_use_sfx(menu->settings.soundfx_enabled);
|
||||
settings_save(&menu->settings);
|
||||
}
|
||||
|
||||
@ -58,9 +58,9 @@ static component_context_menu_t set_protected_entries_type_context_menu = { .lis
|
||||
COMPONENT_CONTEXT_MENU_LIST_END,
|
||||
}};
|
||||
|
||||
static component_context_menu_t set_sound_enabled_type_context_menu = { .list = {
|
||||
{.text = "On", .action = set_sound_enabled_type, .arg = (void *)(uintptr_t)(true) },
|
||||
{.text = "Off", .action = set_sound_enabled_type, .arg = (void *)(uintptr_t)(false) },
|
||||
static component_context_menu_t set_soundfx_enabled_type_context_menu = { .list = {
|
||||
{.text = "On", .action = set_soundfx_enabled_type, .arg = (void *)(uintptr_t)(true) },
|
||||
{.text = "Off", .action = set_soundfx_enabled_type, .arg = (void *)(uintptr_t)(false) },
|
||||
COMPONENT_CONTEXT_MENU_LIST_END,
|
||||
}};
|
||||
|
||||
@ -92,7 +92,7 @@ static component_context_menu_t set_rumble_enabled_type_context_menu = { .list =
|
||||
|
||||
static component_context_menu_t options_context_menu = { .list = {
|
||||
{ .text = "Show Hidden Files", .submenu = &set_protected_entries_type_context_menu },
|
||||
{ .text = "Sound Effects", .submenu = &set_sound_enabled_type_context_menu },
|
||||
{ .text = "Sound Effects", .submenu = &set_soundfx_enabled_type_context_menu },
|
||||
{ .text = "Use Saves Folder", .submenu = &set_use_saves_folder_type_context_menu },
|
||||
#ifdef BETA_SETTINGS
|
||||
{ .text = "PAL60 Mode", .submenu = &set_pal60_type_context_menu },
|
||||
@ -154,7 +154,7 @@ static void draw (menu_t *menu, surface_t *d) {
|
||||
format_switch(menu->settings.rom_autoload_enabled),
|
||||
format_switch(menu->settings.show_protected_entries),
|
||||
format_switch(menu->settings.use_saves_folder),
|
||||
format_switch(menu->settings.sound_enabled)
|
||||
format_switch(menu->settings.soundfx_enabled)
|
||||
#ifdef BETA_SETTINGS
|
||||
,
|
||||
format_switch(menu->settings.pal60_enabled),
|
||||
|
Loading…
x
Reference in New Issue
Block a user