UI: Fix replay buffer frontend event not triggering

The frontend API event OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVED was not
being triggered when hotkeys were used because it was only set to
trigger when the replay buffer button was clicked, not when a hotkey was
used. This fixes it so that the frontend event sends a signal to the
frontend so that hotkeys will actually work.
This commit is contained in:
jp9000
2020-10-12 16:55:01 -07:00
parent a38cd03e06
commit 3d51602690
5 changed files with 24 additions and 0 deletions

View File

@@ -646,6 +646,12 @@ static void replay_buffer_hotkey(void *data, obs_hotkey_id id,
return;
}
calldata_t cd = {0};
signal_handler_t *sh =
obs_output_get_signal_handler(stream->output);
signal_handler_signal(sh, "saved", &cd);
stream->save_ts = os_gettime_ns() / 1000LL;
}
}
@@ -679,6 +685,9 @@ static void *replay_buffer_create(obs_data_t *settings, obs_output_t *output)
proc_handler_add(ph, "void get_last_replay(out string path)",
get_last_replay, stream);
signal_handler_t *sh = obs_output_get_signal_handler(output);
signal_handler_add(sh, "void saved()");
return stream;
}