mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-20 19:13:56 +00:00
Merge branch 'boost_process_fixes' into 'main'
fix: boost_process Linux issue See merge request citron/emulator!67
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@@ -6,7 +7,7 @@
|
|||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
#include <boost/asio.hpp>
|
#include <boost/asio.hpp>
|
||||||
#if !defined(__ANDROID__) && !defined(__APPLE__)
|
#if HAS_BOOST_PROCESS && !defined(__ANDROID__) && !defined(__APPLE__)
|
||||||
#include <boost/process/v1/async_pipe.hpp>
|
#include <boost/process/v1/async_pipe.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -161,11 +162,11 @@ private:
|
|||||||
// Set the new state. This will tear down any existing state.
|
// Set the new state. This will tear down any existing state.
|
||||||
state = ConnectionState{
|
state = ConnectionState{
|
||||||
.client_socket{std::move(peer)},
|
.client_socket{std::move(peer)},
|
||||||
#if !defined(__ANDROID__) && !defined(__APPLE__)
|
#if HAS_BOOST_PROCESS && !defined(__ANDROID__) && !defined(__APPLE__)
|
||||||
.signal_pipe{io_context},
|
.signal_pipe = boost::process::v1::async_pipe(io_context),
|
||||||
#else
|
#else
|
||||||
// Use a regular socket pair for Android and macOS
|
// Use a regular socket pair for Android, macOS, or if boost_process is not found
|
||||||
.signal_pipe{io_context},
|
.signal_pipe = boost::asio::ip::tcp::socket(io_context),
|
||||||
#endif
|
#endif
|
||||||
.info{},
|
.info{},
|
||||||
.active_thread{},
|
.active_thread{},
|
||||||
@@ -333,10 +334,10 @@ private:
|
|||||||
|
|
||||||
struct ConnectionState {
|
struct ConnectionState {
|
||||||
boost::asio::ip::tcp::socket client_socket;
|
boost::asio::ip::tcp::socket client_socket;
|
||||||
#if !defined(__ANDROID__) && !defined(__APPLE__)
|
#if HAS_BOOST_PROCESS && !defined(__ANDROID__) && !defined(__APPLE__)
|
||||||
boost::process::v1::async_pipe signal_pipe;
|
boost::process::v1::async_pipe signal_pipe;
|
||||||
#else
|
#else
|
||||||
// Use a regular socket pair for Android and macOS
|
// Use a regular socket pair for Android, macOS, or if boost_process is not found
|
||||||
boost::asio::ip::tcp::socket signal_pipe;
|
boost::asio::ip::tcp::socket signal_pipe;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user