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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user