From cee6d03033fe43ee3875d6196d6d3697144d51b0 Mon Sep 17 00:00:00 2001 From: RipleyTom Date: Thu, 14 Dec 2023 18:55:30 +0100 Subject: [PATCH] Fix initialization order for network_thread --- rpcs3/Emu/Cell/lv2/sys_net/network_context.cpp | 6 ++++++ rpcs3/Emu/Cell/lv2/sys_net/network_context.h | 1 + 2 files changed, 7 insertions(+) diff --git a/rpcs3/Emu/Cell/lv2/sys_net/network_context.cpp b/rpcs3/Emu/Cell/lv2/sys_net/network_context.cpp index 06a3e5efc8..0a5e010739 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/network_context.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net/network_context.cpp @@ -83,6 +83,12 @@ void need_network() initialize_tcp_timeout_monitor(); } +network_thread::network_thread() +{ + // Ensures IDM for lv2_socket is always valid when the thread is running + g_fxo->init>(); +} + void network_thread::bind_sce_np_port() { std::lock_guard list_lock(list_p2p_ports_mutex); diff --git a/rpcs3/Emu/Cell/lv2/sys_net/network_context.h b/rpcs3/Emu/Cell/lv2/sys_net/network_context.h index accdcee027..3814a4776a 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/network_context.h +++ b/rpcs3/Emu/Cell/lv2/sys_net/network_context.h @@ -17,6 +17,7 @@ struct network_thread static constexpr auto thread_name = "Network Thread"; + network_thread(); void bind_sce_np_port(); void operator()(); };