Fixed segfault
This commit is contained in:
@@ -42,7 +42,7 @@ public:
|
|||||||
|
|
||||||
~vigem_t() {
|
~vigem_t() {
|
||||||
if(client) {
|
if(client) {
|
||||||
if(vigem_target_is_attached(x360.get())) {
|
if(x360 && vigem_target_is_attached(x360.get())) {
|
||||||
auto status = vigem_target_remove(client.get(), x360.get());
|
auto status = vigem_target_remove(client.get(), x360.get());
|
||||||
if(!VIGEM_SUCCESS(status)) {
|
if(!VIGEM_SUCCESS(status)) {
|
||||||
BOOST_LOG(warning) << "Couldn't detach gamepad from ViGEm ["sv << util::hex(status).to_string_view() << ']';
|
BOOST_LOG(warning) << "Couldn't detach gamepad from ViGEm ["sv << util::hex(status).to_string_view() << ']';
|
||||||
|
|||||||
@@ -93,7 +93,9 @@ struct audio_packet_raw_t {
|
|||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
safe::event_t<launch_session_t> launch_event;
|
safe::event_t<launch_session_t> launch_event;
|
||||||
auto input = std::make_shared<input::input_t>();
|
|
||||||
|
//FIXME: This smells bad
|
||||||
|
std::shared_ptr<input::input_t> input;
|
||||||
|
|
||||||
struct config_t {
|
struct config_t {
|
||||||
audio::config_t audio;
|
audio::config_t audio;
|
||||||
@@ -1016,6 +1018,7 @@ void cmd_play(host_t &host, peer_t peer, msg_t &&req) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void rtpThread() {
|
void rtpThread() {
|
||||||
|
input = std::make_shared<input::input_t>();
|
||||||
rtsp_server_t server(RTSP_SETUP_PORT);
|
rtsp_server_t server(RTSP_SETUP_PORT);
|
||||||
|
|
||||||
server.map("OPTIONS"sv, &cmd_option);
|
server.map("OPTIONS"sv, &cmd_option);
|
||||||
|
|||||||
Reference in New Issue
Block a user