really fix build errors

This commit is contained in:
Skirlez 2023-01-07 12:57:53 +02:00 committed by LibretroAdmin
parent e1930a0051
commit 9e668e1673
1 changed files with 16 additions and 12 deletions

View File

@ -1197,11 +1197,13 @@ void menu_input_pointer_close_messagebox(struct menu_state *menu_st)
label = list->list[list->size - 1].label; label = list->list[list->size - 1].label;
/* Play sound for closing the info box */ /* Play sound for closing the info box */
#ifdef HAVE_AUDIOMIXER #ifdef HAVE_AUDIOMIXER
{
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
bool audio_enable_menu = settings->bools.audio_enable_menu; bool audio_enable_menu = settings->bools.audio_enable_menu;
bool audio_enable_menu_notice = settings->bools.audio_enable_menu_notice; bool audio_enable_menu_notice = settings->bools.audio_enable_menu_notice;
if (audio_enable_menu && audio_enable_menu_notice) if (audio_enable_menu && audio_enable_menu_notice)
audio_driver_mixer_play_menu_sound(AUDIO_MIXER_SYSTEM_SLOT_NOTICE_BACK); audio_driver_mixer_play_menu_sound(AUDIO_MIXER_SYSTEM_SLOT_NOTICE_BACK);
}
#endif #endif
} }
@ -7874,11 +7876,13 @@ static int generic_menu_iterate(
menu_st->selection_ptr = selection; menu_st->selection_ptr = selection;
/* Play sound for closing the info box */ /* Play sound for closing the info box */
#ifdef HAVE_AUDIOMIXER #ifdef HAVE_AUDIOMIXER
{
bool audio_enable_menu = settings->bools.audio_enable_menu; bool audio_enable_menu = settings->bools.audio_enable_menu;
bool audio_enable_menu_notice = settings->bools.audio_enable_menu_notice; bool audio_enable_menu_notice = settings->bools.audio_enable_menu_notice;
if (audio_enable_menu && audio_enable_menu_notice && if (audio_enable_menu && audio_enable_menu_notice &&
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_INFO_SCREEN))) string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_INFO_SCREEN)))
audio_driver_mixer_play_menu_sound(AUDIO_MIXER_SYSTEM_SLOT_NOTICE_BACK); audio_driver_mixer_play_menu_sound(AUDIO_MIXER_SYSTEM_SLOT_NOTICE_BACK);
}
#endif #endif
} }
@ -7997,11 +8001,11 @@ int generic_menu_entry_action(
{ {
if (selection_buf_size > 0) if (selection_buf_size > 0)
{ {
unsigned scroll_speed = (unsigned)((MAX(scroll_accel, 2) - 2) / 4 + 10);
#ifdef HAVE_AUDIOMIXER #ifdef HAVE_AUDIOMIXER
if (menu_st->selection_ptr != 0) if (menu_st->selection_ptr != 0)
audio_driver_mixer_play_scroll_sound(false); audio_driver_mixer_play_scroll_sound(false);
#endif #endif
unsigned scroll_speed = (unsigned)((MAX(scroll_accel, 2) - 2) / 4 + 10);
if (!(menu_st->selection_ptr == 0 && !wraparound_enable)) if (!(menu_st->selection_ptr == 0 && !wraparound_enable))
{ {
size_t idx = 0; size_t idx = 0;
@ -8046,11 +8050,11 @@ int generic_menu_entry_action(
{ {
if (selection_buf_size > 0) if (selection_buf_size > 0)
{ {
unsigned scroll_speed = (unsigned)((MAX(scroll_accel, 2) - 2) / 4 + 10);
#ifdef HAVE_AUDIOMIXER #ifdef HAVE_AUDIOMIXER
if (menu_st->selection_ptr != menu_entries_get_size() - 1) if (menu_st->selection_ptr != menu_entries_get_size() - 1)
audio_driver_mixer_play_scroll_sound(false); audio_driver_mixer_play_scroll_sound(false);
#endif #endif
unsigned scroll_speed = (unsigned)((MAX(scroll_accel, 2) - 2) / 4 + 10);
if (!(menu_st->selection_ptr >= selection_buf_size - 1 if (!(menu_st->selection_ptr >= selection_buf_size - 1
&& !wraparound_enable)) && !wraparound_enable))
{ {