mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-13 13:28:49 +00:00
Add hotkeys for 'Toggle Recording' / 'Toggle Streaming'
This commit is contained in:
parent
6c84072c3b
commit
cb8148878c
@ -184,6 +184,8 @@ static const struct cmd_map map[] = {
|
||||
{ "UI_COMPANION_TOGGLE", RARCH_UI_COMPANION_TOGGLE },
|
||||
{ "GAME_FOCUS_TOGGLE", RARCH_GAME_FOCUS_TOGGLE },
|
||||
{ "MENU_TOGGLE", RARCH_MENU_TOGGLE },
|
||||
{ "RECORDING_TOGGLE", RARCH_RECORDING_TOGGLE },
|
||||
{ "STREAMING_TOGGLE", RARCH_STREAMING_TOGGLE },
|
||||
{ "MENU_UP", RETRO_DEVICE_ID_JOYPAD_UP },
|
||||
{ "MENU_DOWN", RETRO_DEVICE_ID_JOYPAD_DOWN },
|
||||
{ "MENU_LEFT", RETRO_DEVICE_ID_JOYPAD_LEFT },
|
||||
|
@ -99,6 +99,8 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_GAME_FOCUS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_UI_COMPANION_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, RETROK_SPACE, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_RECORDING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STREAMING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
#else
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, RETROK_z, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_Y, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y, RETROK_a, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
@ -175,6 +177,8 @@ static const struct retro_keybind retro_keybinds_1[] = {
|
||||
{ true, RARCH_GAME_FOCUS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, RETROK_SCROLLOCK, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_UI_COMPANION_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, RETROK_F5, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, RETROK_F1, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_RECORDING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STREAMING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -111,6 +111,9 @@ enum
|
||||
|
||||
RARCH_MENU_TOGGLE,
|
||||
|
||||
RARCH_RECORDING_TOGGLE,
|
||||
RARCH_STREAMING_TOGGLE,
|
||||
|
||||
RARCH_BIND_LIST_END,
|
||||
RARCH_BIND_LIST_END_NULL
|
||||
};
|
||||
|
@ -351,6 +351,8 @@ const struct input_bind_map input_config_bind_map[RARCH_BIND_LIST_END_NULL] = {
|
||||
#ifdef HAVE_MENU
|
||||
DECLARE_META_BIND(1, menu_toggle, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE),
|
||||
#endif
|
||||
DECLARE_META_BIND(2, recording_toggle, RARCH_RECORDING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE),
|
||||
DECLARE_META_BIND(2, streaming_toggle, RARCH_STREAMING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE),
|
||||
};
|
||||
|
||||
|
||||
|
@ -3615,3 +3615,11 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_STREAMING,
|
||||
"Stops streaming."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
"Recording toggle"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
"Streaming toggle"
|
||||
)
|
||||
|
@ -3399,3 +3399,11 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_STREAMING,
|
||||
"Stops streaming."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
"Recording toggle"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
"Streaming toggle"
|
||||
)
|
||||
|
@ -3391,3 +3391,11 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_STREAMING,
|
||||
"Stops streaming."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
"Recording toggle"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
"Streaming toggle"
|
||||
)
|
||||
|
@ -3501,3 +3501,11 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_STREAMING,
|
||||
"Stops streaming."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
"Recording toggle"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
"Streaming toggle"
|
||||
)
|
||||
|
@ -3266,3 +3266,11 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_STREAMING,
|
||||
"Stops streaming."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
"Recording toggle"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
"Streaming toggle"
|
||||
)
|
||||
|
@ -7521,3 +7521,11 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_STREAMING,
|
||||
"Detiene el streaming"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
"Recording toggle"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
"Streaming toggle"
|
||||
)
|
||||
|
@ -3425,3 +3425,11 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_STREAMING,
|
||||
"Stops streaming."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
"Recording toggle"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
"Streaming toggle"
|
||||
)
|
||||
|
@ -3485,3 +3485,11 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_STREAMING,
|
||||
"Interrompe lo streaming."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
"Recording toggle"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
"Streaming toggle"
|
||||
)
|
||||
|
@ -3886,3 +3886,11 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_STREAMING,
|
||||
"Stops streaming."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
"Recording toggle"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
"Streaming toggle"
|
||||
)
|
||||
|
@ -3386,3 +3386,11 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_STREAMING,
|
||||
"Stops streaming."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
"Recording toggle"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
"Streaming toggle"
|
||||
)
|
||||
|
@ -3555,3 +3555,11 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_STREAMING,
|
||||
"Stops streaming."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
"Recording toggle"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
"Streaming toggle"
|
||||
)
|
||||
|
@ -7522,3 +7522,11 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_STREAMING,
|
||||
"Stops streaming."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
"Recording toggle"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
"Streaming toggle"
|
||||
)
|
||||
|
@ -3423,3 +3423,11 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_QUICK_MENU_STOP_STREAMING,
|
||||
"Stops streaming."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
"Recording toggle"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
"Streaming toggle"
|
||||
)
|
||||
|
@ -657,6 +657,8 @@ enum msg_hash_enums
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE,
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_DEVICE_INDEX,
|
||||
|
30
retroarch.c
30
retroarch.c
@ -2930,6 +2930,36 @@ static enum runloop_state runloop_check_state(
|
||||
old_pressed = pressed;
|
||||
}
|
||||
|
||||
/* Check recording toggle */
|
||||
{
|
||||
static bool old_pressed = false;
|
||||
bool pressed = BIT256_GET(
|
||||
current_input, RARCH_RECORDING_TOGGLE);
|
||||
|
||||
if (pressed && !old_pressed)
|
||||
{
|
||||
/* TODO/FIXME */
|
||||
/* insert logic here */
|
||||
}
|
||||
|
||||
old_pressed = pressed;
|
||||
}
|
||||
|
||||
/* Check streaming toggle */
|
||||
{
|
||||
static bool old_pressed = false;
|
||||
bool pressed = BIT256_GET(
|
||||
current_input, RARCH_STREAMING_TOGGLE);
|
||||
|
||||
if (pressed && !old_pressed)
|
||||
{
|
||||
/* TODO/FIXME */
|
||||
/* insert logic here */
|
||||
}
|
||||
|
||||
old_pressed = pressed;
|
||||
}
|
||||
|
||||
if (BIT256_GET(current_input, RARCH_VOLUME_UP))
|
||||
command_event(CMD_EVENT_VOLUME_UP, NULL);
|
||||
else if (BIT256_GET(current_input, RARCH_VOLUME_DOWN))
|
||||
|
Loading…
Reference in New Issue
Block a user