mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-03-10 23:45:16 +01:00
Merge 2a72502984 into 0603d24a91
This commit is contained in:
commit
a5723959b7
|
|
@ -51,6 +51,7 @@ std::unordered_map<std::string, ppu_static_module*>& ppu_module_manager::get()
|
|||
std::vector<std::string> g_ppu_function_names;
|
||||
|
||||
atomic_t<u32> liblv2_begin = 0, liblv2_end = 0;
|
||||
atomic_t<bool> libusbd_active = false;
|
||||
|
||||
extern u32 ppu_generate_id(std::string_view name)
|
||||
{
|
||||
|
|
@ -1920,6 +1921,10 @@ shared_ptr<lv2_prx> ppu_load_prx(const ppu_prx_object& elf, bool virtual_load, c
|
|||
liblv2_begin = prx->segs[0].addr;
|
||||
liblv2_end = prx->segs[0].addr + prx->segs[0].size;
|
||||
}
|
||||
if (prx->path.ends_with("sys/external/libusbd.sprx"sv))
|
||||
{
|
||||
libusbd_active = true;
|
||||
}
|
||||
|
||||
std::vector<u32> applied;
|
||||
|
||||
|
|
@ -2054,6 +2059,10 @@ void ppu_unload_prx(const lv2_prx& prx)
|
|||
liblv2_begin = 0;
|
||||
liblv2_end = 0;
|
||||
}
|
||||
if (prx.path.ends_with("sys/external/libusbd.sprx"sv))
|
||||
{
|
||||
libusbd_active = false;
|
||||
}
|
||||
|
||||
// Format patch name
|
||||
std::string hash = fmt::format("PRX-%s", fmt::base57(prx.sha1));
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ cfg_guncon3 g_cfg_guncon3;
|
|||
cfg_topshotelite g_cfg_topshotelite;
|
||||
cfg_topshotfearmaster g_cfg_topshotfearmaster;
|
||||
|
||||
extern atomic_t<bool> libusbd_active;
|
||||
|
||||
template <>
|
||||
void fmt_class_string<libusb_transfer>::format(std::string& out, u64 arg)
|
||||
{
|
||||
|
|
@ -661,7 +663,7 @@ void usb_handler_thread::operator()()
|
|||
u64 delay = 1'000;
|
||||
|
||||
// Process fake transfers
|
||||
if (!fake_transfers.empty())
|
||||
if (libusbd_active && !fake_transfers.empty())
|
||||
{
|
||||
std::lock_guard lock_tf(mutex_transfers);
|
||||
u64 timestamp = get_system_time() - Emu.GetPauseTime();
|
||||
|
|
|
|||
Loading…
Reference in a new issue