diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index ebaadcea4b..82f344e8a0 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -2351,10 +2351,9 @@ void thread_ctrl::wait_for(u64 usec, [[maybe_unused]] bool alert /* true */) { struct itimerspec timeout; u64 missed; - u64 nsec = usec * 1000ull; - timeout.it_value.tv_nsec = (nsec % 1000000000ull); - timeout.it_value.tv_sec = nsec / 1000000000ull; + timeout.it_value.tv_nsec = usec * 1'000ull; + timeout.it_value.tv_sec = 0; timeout.it_interval.tv_sec = 0; timeout.it_interval.tv_nsec = 0; timerfd_settime(fd_timer, 0, &timeout, NULL); diff --git a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.cpp b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.cpp index a9a47a925b..ea3722faa4 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net/lv2_socket_p2ps.cpp @@ -382,7 +382,7 @@ bool lv2_socket_p2ps::handle_listening(p2ps_encapsulated_tcp* tcp_header, [[mayb } // Only valid packet - if (tcp_header->flags == p2ps_tcp_flags::SYN && backlog.size() < max_backlog) + if (tcp_header->flags == p2ps_tcp_flags::SYN) { if (backlog.size() >= max_backlog) { @@ -394,6 +394,7 @@ bool lv2_socket_p2ps::handle_listening(p2ps_encapsulated_tcp* tcp_header, [[mayb send_hdr.flags = p2ps_tcp_flags::RST; auto packet = generate_u2s_packet(send_hdr, nullptr, 0); send_u2s_packet(std::move(packet), reinterpret_cast<::sockaddr_in*>(op_addr), 0, false); + return true; } // Yes, new connection and a backlog is available, create a new lv2_socket for it and send SYN|ACK @@ -450,17 +451,6 @@ bool lv2_socket_p2ps::handle_listening(p2ps_encapsulated_tcp* tcp_header, [[mayb } } } - else if (tcp_header->flags == p2ps_tcp_flags::SYN) - { - // Send a RST packet on backlog full - sys_net.trace("[P2PS] Backlog was full, sent a RST packet"); - p2ps_encapsulated_tcp send_hdr; - send_hdr.src_port = tcp_header->dst_port; - send_hdr.dst_port = tcp_header->src_port; - send_hdr.flags = p2ps_tcp_flags::RST; - auto packet = generate_u2s_packet(send_hdr, nullptr, 0); - send_u2s_packet(std::move(packet), reinterpret_cast<::sockaddr_in*>(op_addr), 0, false); - } // Ignore other packets? diff --git a/rpcs3/Input/evdev_joystick_handler.h b/rpcs3/Input/evdev_joystick_handler.h index 3e690538be..a8f41cb2ed 100644 --- a/rpcs3/Input/evdev_joystick_handler.h +++ b/rpcs3/Input/evdev_joystick_handler.h @@ -131,7 +131,7 @@ class evdev_joystick_handler final : public PadHandlerBase { 0x11d , "0x11d" }, { 0x11e , "0x11e" }, { 0x11f , "0x11f" }, - { BTN_JOYSTICK , "Joystick" }, + //{ BTN_JOYSTICK , "Joystick" }, same as BTN_TRIGGER { BTN_TRIGGER , "Trigger" }, { BTN_THUMB , "Thumb" }, { BTN_THUMB2 , "Thumb 2" },