mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-27 03:56:06 +00:00
(GX) Rewrite audio interleaving
(GX) Make menu_binds variable Wii-only for now (Menu) Add toggleable autodetect_enable for input
This commit is contained in:
parent
4a0f8e4346
commit
eacc193d74
@ -475,7 +475,11 @@ static uint64_t menu_input(void)
|
||||
unsigned i;
|
||||
uint64_t input_state = 0;
|
||||
|
||||
#ifdef HW_RVL
|
||||
static const struct retro_keybind *binds[] = { g_settings.input.menu_binds };
|
||||
#else
|
||||
static const struct retro_keybind *binds[] = { g_settings.input.binds[0] };
|
||||
#endif
|
||||
|
||||
for (i = 0; i < RETRO_DEVICE_ID_JOYPAD_R2; i++)
|
||||
{
|
||||
@ -1961,6 +1965,7 @@ void menu_populate_entries(void *data, unsigned menu_type)
|
||||
file_list_push(rgui->selection_buf, "Player", RGUI_SETTINGS_BIND_PLAYER, 0);
|
||||
file_list_push(rgui->selection_buf, "Device", RGUI_SETTINGS_BIND_DEVICE, 0);
|
||||
file_list_push(rgui->selection_buf, "Device Type", RGUI_SETTINGS_BIND_DEVICE_TYPE, 0);
|
||||
file_list_push(rgui->selection_buf, "Autodetect enable", RGUI_SETTINGS_DEVICE_AUTODETECT_ENABLE, 0);
|
||||
|
||||
file_list_push(rgui->selection_buf, "Configure All (RetroPad)", RGUI_SETTINGS_CUSTOM_BIND_ALL, 0);
|
||||
file_list_push(rgui->selection_buf, "Default All (RetroPad)", RGUI_SETTINGS_CUSTOM_BIND_DEFAULT_ALL, 0);
|
||||
|
@ -154,6 +154,7 @@ typedef enum
|
||||
RGUI_SETTINGS_BIND_PLAYER,
|
||||
RGUI_SETTINGS_BIND_DEVICE,
|
||||
RGUI_SETTINGS_BIND_DEVICE_TYPE,
|
||||
RGUI_SETTINGS_DEVICE_AUTODETECT_ENABLE,
|
||||
|
||||
// Match up with libretro order for simplicity.
|
||||
RGUI_SETTINGS_BIND_BEGIN,
|
||||
|
@ -802,6 +802,10 @@ int menu_set_settings(void *data, unsigned setting, unsigned action)
|
||||
|
||||
break;
|
||||
}
|
||||
case RGUI_SETTINGS_DEVICE_AUTODETECT_ENABLE:
|
||||
if (action == RGUI_ACTION_OK)
|
||||
g_settings.input.autodetect_enable = !g_settings.input.autodetect_enable;
|
||||
break;
|
||||
case RGUI_SETTINGS_CUSTOM_BIND_ALL:
|
||||
if (action == RGUI_ACTION_OK)
|
||||
{
|
||||
@ -1826,6 +1830,9 @@ void menu_set_settings_label(char *type_str, size_t type_str_size, unsigned *w,
|
||||
strlcpy(type_str, name, type_str_size);
|
||||
break;
|
||||
}
|
||||
case RGUI_SETTINGS_DEVICE_AUTODETECT_ENABLE:
|
||||
strlcpy(type_str, "Autodetect Enable", type_str_size);
|
||||
break;
|
||||
case RGUI_SETTINGS_BIND_UP:
|
||||
case RGUI_SETTINGS_BIND_DOWN:
|
||||
case RGUI_SETTINGS_BIND_LEFT:
|
||||
|
@ -222,7 +222,9 @@ struct settings
|
||||
char joypad_driver[32];
|
||||
char keyboard_layout[64];
|
||||
struct retro_keybind binds[MAX_PLAYERS][RARCH_BIND_LIST_END];
|
||||
#ifdef HW_RVL
|
||||
struct retro_keybind menu_binds[RARCH_BIND_LIST_END];
|
||||
#endif
|
||||
|
||||
// Set by autoconfiguration in joypad_autoconfig_dir. Does not override main binds.
|
||||
struct retro_keybind autoconf_binds[MAX_PLAYERS][RARCH_BIND_LIST_END];
|
||||
|
@ -94,11 +94,11 @@ static void *gx_audio_init(const char *device, unsigned rate, unsigned latency)
|
||||
// Wii uses silly R, L, R, L interleaving ...
|
||||
static inline void copy_swapped(uint32_t * restrict dst, const uint32_t * restrict src, size_t size)
|
||||
{
|
||||
for (size_t i = 0; i < size; i++)
|
||||
do
|
||||
{
|
||||
uint32_t s = src[i];
|
||||
dst[i] = (s >> 16) | (s << 16);
|
||||
}
|
||||
uint32_t s = *src++;
|
||||
*dst++ = (s >> 16) | (s << 16);
|
||||
}while(--size);
|
||||
}
|
||||
|
||||
static ssize_t gx_audio_write(void *data, const void *buf_, size_t size)
|
||||
|
@ -286,8 +286,6 @@ void config_set_defaults(void)
|
||||
memcpy(g_settings.input.binds[0], retro_keybinds_1, sizeof(retro_keybinds_1));
|
||||
#ifdef HW_RVL
|
||||
memcpy(g_settings.input.menu_binds, retro_keybinds_menu, sizeof(retro_keybinds_menu));
|
||||
#else
|
||||
memcpy(g_settings.input.menu_binds, retro_keybinds_1, sizeof(retro_keybinds_1));
|
||||
#endif
|
||||
for (i = 1; i < MAX_PLAYERS; i++)
|
||||
memcpy(g_settings.input.binds[i], retro_keybinds_rest, sizeof(retro_keybinds_rest));
|
||||
|
Loading…
x
Reference in New Issue
Block a user