Fixed incorrect logging type called

This commit is contained in:
loki 2020-01-31 21:17:49 +01:00
parent b10c971374
commit c71d2739b1
2 changed files with 4 additions and 5 deletions

View File

@ -6,8 +6,6 @@ extern "C" {
#include <moonlight-common-c/src/Input.h>
}
#include <cstring>
#include "main.h"
#include "config.h"
#include "input.h"
@ -134,14 +132,16 @@ void passthrough(std::shared_ptr<input_t> &input, PNV_MULTI_CONTROLLER_PACKET pa
platf::free_gamepad(input->input, x);
}
else if(platf::alloc_gamepad(input->input, x)) {
//TODO: abort stream session
// allocating a gamepad failed: solution: ignore gamepads
// The implementations of platf::alloc_gamepad already have logging
return;
}
}
}
input->active_gamepad_state = packet->activeGamepadMask;
if(packet->controllerNumber < 0 || packet->controllerNumber >= input->gamepads.size()) {
BOOST_LOG(error) << "ControllerNumber out of range ["sv << packet->controllerNumber << ']';
BOOST_LOG(warning) << "ControllerNumber out of range ["sv << packet->controllerNumber << ']';
return;
}

View File

@ -1,4 +1,3 @@
#include <thread>
#include <sstream>
#include <iomanip>