mirror of
https://github.com/libretro/RetroArch
synced 2025-01-18 13:23:40 +00:00
(Wii) Use rarch_settings_change for toggling settings-related options
as much as possible
This commit is contained in:
parent
050441741b
commit
968924eca6
@ -34,6 +34,9 @@ void rarch_settings_change(unsigned setting)
|
||||
if(g_console.aspect_ratio_index < LAST_ASPECT_RATIO)
|
||||
g_console.aspect_ratio_index++;
|
||||
break;
|
||||
case S_AUDIO_MUTE:
|
||||
g_extern.audio_data.mute = !g_extern.audio_data.mute;
|
||||
break;
|
||||
case S_FRAME_ADVANCE:
|
||||
g_console.frame_advance_enable = true;
|
||||
g_console.menu_enable = false;
|
||||
@ -147,6 +150,9 @@ void rarch_settings_default(unsigned setting)
|
||||
case S_DEF_ASPECT_RATIO:
|
||||
g_console.aspect_ratio_index = ASPECT_RATIO_4_3;
|
||||
break;
|
||||
case S_DEF_AUDIO_MUTE:
|
||||
g_extern.audio_data.mute = false;
|
||||
break;
|
||||
case S_DEF_HW_TEXTURE_FILTER:
|
||||
g_settings.video.smooth = 1;
|
||||
break;
|
||||
|
@ -31,6 +31,7 @@ enum
|
||||
{
|
||||
S_ASPECT_RATIO_DECREMENT = 0,
|
||||
S_ASPECT_RATIO_INCREMENT,
|
||||
S_AUDIO_MUTE,
|
||||
S_FRAME_ADVANCE,
|
||||
S_HW_TEXTURE_FILTER,
|
||||
S_HW_TEXTURE_FILTER_2,
|
||||
@ -59,6 +60,7 @@ enum
|
||||
enum
|
||||
{
|
||||
S_DEF_ASPECT_RATIO = 0,
|
||||
S_DEF_AUDIO_MUTE,
|
||||
S_DEF_HW_TEXTURE_FILTER,
|
||||
S_DEF_HW_TEXTURE_FILTER_2,
|
||||
S_DEF_OVERSCAN,
|
||||
|
@ -1357,11 +1357,10 @@ static void producesettingentry(menu * menu_obj, unsigned switchvalue)
|
||||
break;
|
||||
case SETTING_EMU_AUDIO_MUTE:
|
||||
if((input_state & (1 << RETRO_DEVICE_ID_JOYPAD_LEFT)) || (input_state & (1 << RETRO_DEVICE_ID_JOYPAD_RIGHT)) || (input_state & (1 << RETRO_DEVICE_ID_JOYPAD_B)))
|
||||
{
|
||||
g_extern.audio_data.mute = !g_extern.audio_data.mute;
|
||||
}
|
||||
rarch_settings_change(S_AUDIO_MUTE);
|
||||
|
||||
if(input_state & (1 << RETRO_DEVICE_ID_JOYPAD_START))
|
||||
g_extern.audio_data.mute = false;
|
||||
rarch_settings_default(S_DEF_AUDIO_MUTE);
|
||||
break;
|
||||
case SETTING_ENABLE_CUSTOM_BGM:
|
||||
if((input_state & (1 << RETRO_DEVICE_ID_JOYPAD_LEFT)) || (input_state & (1 << RETRO_DEVICE_ID_JOYPAD_RIGHT)) || (input_state & (1 << RETRO_DEVICE_ID_JOYPAD_B)))
|
||||
|
@ -226,7 +226,11 @@ static void render_text(rgui_handle_t *rgui, size_t begin, size_t end)
|
||||
w = 5;
|
||||
break;
|
||||
case RGUI_SETTINGS_VIDEO_FILTER:
|
||||
type_str = g_settings.video.smooth ? "Bilinear" : "None";
|
||||
type_str = g_settings.video.smooth ? "Bilinear filtering" : "Point filtering";
|
||||
w = 8;
|
||||
break;
|
||||
case RGUI_SETTINGS_AUDIO_MUTE:
|
||||
type_str = g_extern.audio_data.mute ? "ON" : "OFF";
|
||||
w = 8;
|
||||
break;
|
||||
default:
|
||||
@ -292,9 +296,11 @@ static void rgui_settings_toggle_setting(rgui_file_type_t setting)
|
||||
break;*/
|
||||
|
||||
case RGUI_SETTINGS_VIDEO_FILTER:
|
||||
g_settings.video.smooth = !g_settings.video.smooth;
|
||||
rarch_settings_change(S_HW_TEXTURE_FILTER);
|
||||
break;
|
||||
case RGUI_SETTINGS_AUDIO_MUTE:
|
||||
rarch_settings_change(S_AUDIO_MUTE);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -304,7 +310,8 @@ static void rgui_settings_populate_entries(rgui_handle_t *rgui)
|
||||
{
|
||||
rgui_list_clear(rgui->folder_buf);
|
||||
|
||||
rgui_list_push(rgui->folder_buf, "Filter", RGUI_SETTINGS_VIDEO_FILTER, 0);
|
||||
rgui_list_push(rgui->folder_buf, "Hardware filtering", RGUI_SETTINGS_VIDEO_FILTER, 0);
|
||||
rgui_list_push(rgui->folder_buf, "Mute Audio", RGUI_SETTINGS_AUDIO_MUTE, 1);
|
||||
}
|
||||
|
||||
static bool rgui_settings_iterate(rgui_handle_t *rgui, rgui_action_t action)
|
||||
|
@ -33,7 +33,8 @@ typedef enum
|
||||
|
||||
// settings options are done here too
|
||||
//RGUI_SETTINGS_VIDEO_STRETCH,
|
||||
RGUI_SETTINGS_VIDEO_FILTER
|
||||
RGUI_SETTINGS_VIDEO_FILTER,
|
||||
RGUI_SETTINGS_AUDIO_MUTE
|
||||
} rgui_file_type_t;
|
||||
|
||||
typedef enum
|
||||
|
Loading…
x
Reference in New Issue
Block a user