mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
requesthandler: Fix oopsies in OpenVideoMixProjector
This commit is contained in:
parent
798eebf638
commit
2524dc47cf
@ -219,7 +219,7 @@ RequestResult RequestHandler::OpenVideoMixProjector(const Request &request)
|
||||
{
|
||||
RequestStatus::RequestStatus statusCode;
|
||||
std::string comment;
|
||||
if (!request.ValidateString("mixType", statusCode, comment))
|
||||
if (!request.ValidateString("videoMixType", statusCode, comment))
|
||||
return RequestResult::Error(statusCode, comment);
|
||||
|
||||
std::string videoMixType = request.RequestData["videoMixType"];
|
||||
@ -231,8 +231,7 @@ RequestResult RequestHandler::OpenVideoMixProjector(const Request &request)
|
||||
else if (videoMixType == "OBS_WEBSOCKET_VIDEO_MIX_TYPE_MULTIVIEW")
|
||||
projectorType = "Multiview";
|
||||
else
|
||||
return RequestResult::Error(RequestStatus::InvalidRequestField,
|
||||
"The field `videoMixType` has an invalid enum value.");
|
||||
return RequestResult::Error(RequestStatus::InvalidRequestField, "The field `videoMixType` has an invalid enum value.");
|
||||
|
||||
int monitorIndex = -1;
|
||||
if (request.Contains("monitorIndex")) {
|
||||
@ -246,8 +245,7 @@ RequestResult RequestHandler::OpenVideoMixProjector(const Request &request)
|
||||
if (!request.ValidateOptionalString("projectorGeometry", statusCode, comment))
|
||||
return RequestResult::Error(statusCode, comment);
|
||||
if (monitorIndex != -1)
|
||||
return RequestResult::Error(RequestStatus::TooManyRequestFields,
|
||||
"`monitorIndex` and `projectorGeometry` are mutually exclusive.");
|
||||
return RequestResult::Error(RequestStatus::TooManyRequestFields, "`monitorIndex` and `projectorGeometry` are mutually exclusive.");
|
||||
projectorGeometry = request.RequestData["projectorGeometry"];
|
||||
}
|
||||
|
||||
@ -292,8 +290,7 @@ RequestResult RequestHandler::OpenSourceProjector(const Request &request)
|
||||
if (!request.ValidateOptionalString("projectorGeometry", statusCode, comment))
|
||||
return RequestResult::Error(statusCode, comment);
|
||||
if (monitorIndex != -1)
|
||||
return RequestResult::Error(RequestStatus::TooManyRequestFields,
|
||||
"`monitorIndex` and `projectorGeometry` are mutually exclusive.");
|
||||
return RequestResult::Error(RequestStatus::TooManyRequestFields, "`monitorIndex` and `projectorGeometry` are mutually exclusive.");
|
||||
projectorGeometry = request.RequestData["projectorGeometry"];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user