UI: Fix hotkey JSON error for Advanced Replay Buffer

This matches the Simple output Replay Buffer hotkey code.
This commit is contained in:
Matt Gajownik 2022-01-08 13:34:40 +11:00
parent a708eda753
commit ff42da373b

View file

@ -1205,10 +1205,14 @@ AdvancedOutput::AdvancedOutput(OBSBasic *main_) : BasicOutputHandler(main_)
bool useReplayBuffer =
config_get_bool(main->Config(), "AdvOut", "RecRB");
if (useReplayBuffer) {
OBSDataAutoRelease hotkey;
const char *str = config_get_string(
main->Config(), "Hotkeys", "ReplayBuffer");
OBSDataAutoRelease hotkey =
obs_data_create_from_json(str);
if (str)
hotkey = obs_data_create_from_json(str);
else
hotkey = nullptr;
replayBuffer = obs_output_create("replay_buffer",
Str("ReplayBuffer"),
nullptr, hotkey);