network: Add NOMEM errno handling for socket operations
Implements support for ENOMEM (errno 12) across the network stack: - Added NOMEM to Network::Errno enum - Added NOMEM = 12 to sockets Errno enum - Added translation case in sockets_translate.cpp This is the first step towards addressing the 0.0 FPS bug that occurs when the system runs out of memory during socket operations. Previously, these operations would trigger an unimplemented assertion, causing the emulator to halt. Now the error will be properly propagated to the guest application.
This commit is contained in:
parent
f138e07556
commit
78d43b234f
@ -26,6 +26,7 @@ enum class Errno : u32 {
|
||||
TIMEDOUT = 110,
|
||||
CONNREFUSED = 111,
|
||||
INPROGRESS = 115,
|
||||
NOMEM = 12,
|
||||
};
|
||||
|
||||
enum class GetAddrInfoError : s32 {
|
||||
|
||||
@ -37,6 +37,8 @@ Errno Translate(Network::Errno value) {
|
||||
return Errno::CONNRESET;
|
||||
case Network::Errno::INPROGRESS:
|
||||
return Errno::INPROGRESS;
|
||||
case Network::Errno::NOMEM:
|
||||
return Errno::NOMEM;
|
||||
default:
|
||||
UNIMPLEMENTED_MSG("Unimplemented errno={}", value);
|
||||
return Errno::SUCCESS;
|
||||
|
||||
@ -46,6 +46,7 @@ enum class Errno {
|
||||
MSGSIZE,
|
||||
INPROGRESS,
|
||||
OTHER,
|
||||
NOMEM,
|
||||
};
|
||||
|
||||
enum class GetAddrInfoError {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
||||
"name": "yuzu",
|
||||
"builtin-baseline": "7adc2e4d49e8d0efc07a369079faa6bc3dbb90f3",
|
||||
"builtin-baseline": "c82f74667287d3dc386bce81e44964370c91a289",
|
||||
"version": "1.0",
|
||||
"dependencies": [
|
||||
"boost-algorithm",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user