mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-31 15:53:17 +00:00
sceNetAccept sleep and SDLAudio::AudioOutOutput latency and cpu improvements (#507)
* Add 5-second sleep on sceNetAccept as this can be called in an infinite loop and would normally block (this isn't ideal for non-blocking sockets but it's all stubs at the moment anyway) * SDLAudio::AudioOutOutput: protect against invalid handle, support NULL input (wait only), replace fixed 65536 with an amount based on settable latency target (20ms for now) * Fix whitespace --------- Co-authored-by: j <j@local>
This commit is contained in:
parent
fdb13a3b90
commit
d66d129357
2 changed files with 28 additions and 12 deletions
|
@ -1,6 +1,8 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <thread>
|
||||
|
||||
#ifdef WIN32
|
||||
#define _WINSOCK_DEPRECATED_NO_WARNINGS
|
||||
#include <Ws2tcpip.h>
|
||||
|
@ -59,7 +61,8 @@ int PS4_SYSV_ABI sce_net_in6addr_nodelocal_allnodes() {
|
|||
}
|
||||
|
||||
OrbisNetId PS4_SYSV_ABI sceNetAccept(OrbisNetId s, OrbisNetSockaddr* addr, u32* paddrlen) {
|
||||
LOG_ERROR(Lib_Net, "(STUBBED) called");
|
||||
LOG_ERROR(Lib_Net, "(STUBBED) called [sleeping]");
|
||||
std::this_thread::sleep_for(std::chrono::seconds(5));
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue