fix: socket assertion crashes and add Nex service stub

- Replace socket option assertion failures with proper error returns
- Add WSAENOPROTOOPT/ENOPROTOOPT error handling
- Fix LINGER and option value size validation
- Add Network::Errno::OTHER translation
- Implement basic Nex service stub for error code 2306-0520

Fixes crashes in Minecraft and other games when encountering unsupported
socket operations or attempting to use Nintendo's online services.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron
2025-11-13 19:30:40 +10:00
parent ba9dead3ee
commit 19faff40cd
9 changed files with 216 additions and 15 deletions

View File

@@ -663,12 +663,12 @@ struct Values {
Setting<bool> airplane_mode{linkage, false, "airplane_mode", Category::Network};
Setting<std::string> network_interface{linkage, std::string(), "network_interface",
Category::Network};
Setting<std::string> lobby_api_url{linkage, "https://api.ynet-fun.xyz", "lobby_api_url",
Setting<std::string> lobby_api_url{linkage, "api.ynet-fun.xyz", "lobby_api_url",
Category::Network};
// WebService
Setting<bool> enable_telemetry{linkage, false, "enable_telemetry", Category::WebService};
Setting<std::string> web_api_url{linkage, "https://api.ynet-fun.xyz", "web_api_url",
Setting<std::string> web_api_url{linkage, "api.ynet-fun.xyz", "web_api_url",
Category::WebService};
Setting<std::string> citron_username{linkage, std::string(), "citron_username",
Category::WebService};