mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
Start/Stop IPC when changing the config setting
This commit is contained in:
parent
907e0fa8c8
commit
f8e0c9e27a
@ -108,12 +108,14 @@ namespace IPC_socket
|
||||
int port = g_cfg_ipc.get_port();
|
||||
if (!m_ipc_server || port != m_old_port)
|
||||
{
|
||||
IPC.notice("Starting server with port %d", port);
|
||||
m_ipc_server = std::make_unique<IPC_server>();
|
||||
m_old_port = port;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (m_ipc_server)
|
||||
{
|
||||
IPC.notice("Stopping server");
|
||||
m_ipc_server.reset();
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,9 @@
|
||||
|
||||
#include "ipc_settings_dialog.h"
|
||||
#include "Emu/IPC_config.h"
|
||||
#include "Emu/IPC_socket.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
ipc_settings_dialog::ipc_settings_dialog(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
@ -54,6 +57,15 @@ ipc_settings_dialog::ipc_settings_dialog(QWidget* parent)
|
||||
g_cfg_ipc.set_port(server_port);
|
||||
g_cfg_ipc.save();
|
||||
|
||||
if (auto manager = g_fxo->try_get<IPC_socket::IPC_server_manager>())
|
||||
{
|
||||
manager->set_server_enabled(server_enabled);
|
||||
}
|
||||
else if (server_enabled && Emu.IsRunning())
|
||||
{
|
||||
g_fxo->init<IPC_socket::IPC_server_manager>(true);
|
||||
}
|
||||
|
||||
accept();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user