Apply suggestions from code review

Fixes all the easy ones. I'll look into the more substantive changes in a bit.

Co-Authored-By: Stéphane Lepin <Palakis@users.noreply.github.com>
This commit is contained in:
Chris Angelico 2020-03-05 05:14:46 +11:00 committed by GitHub
parent 209555d36d
commit 9fc41e4245
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -316,10 +316,10 @@ RpcResponse WSRequestHandler::GetVideoInfo(const RpcRequest& request) {
* @api requests
* @name OpenProjector
* @category general
* @since 4.7.0
* @since unreleased
*/
RpcResponse WSRequestHandler::OpenProjector(const RpcRequest& request) {
#if LIBOBS_API_VER >= 0x18000004
#if LIBOBS_API_VER >= 0x18000004
const char *type = obs_data_get_string(request.parameters(), "type");
int monitor = -1;
if (request.hasField("monitor")) {
@ -329,7 +329,7 @@ RpcResponse WSRequestHandler::OpenProjector(const RpcRequest& request) {
const char *name = obs_data_get_string(request.parameters(), "name");
obs_frontend_open_projector(type, monitor, geometry, name);
return request.success();
#else
#else
return request.failed("Projector opening requires libobs v24.0.4 or newer.");
#endif
#endif
}