mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Merge pull request #142 from RytoEX/save-replay-buffer
Fix saving replay buffer when no hotkey is set
This commit is contained in:
commit
fe644cfa82
@ -780,13 +780,15 @@ void WSRequestHandler::HandleSaveReplayBuffer(WSRequestHandler* req) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
obs_hotkey_t* hk = Utils::FindHotkeyByName("ReplayBuffer.Save");
|
calldata_t cd = {0};
|
||||||
if (hk) {
|
obs_output_t* replay_output = obs_frontend_get_replay_buffer_output();
|
||||||
obs_hotkey_trigger_routed_callback(obs_hotkey_get_id(hk), true);
|
proc_handler_t* ph = obs_output_get_proc_handler(replay_output);
|
||||||
req->SendOKResponse();
|
proc_handler_call(ph, "save", &cd);
|
||||||
} else {
|
|
||||||
req->SendErrorResponse("failed to save replay buffer");
|
req->SendOKResponse();
|
||||||
}
|
|
||||||
|
calldata_free(&cd);
|
||||||
|
obs_output_release(replay_output);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user