mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-03 11:13:44 +01:00
Apply a few lines from "Added UPnP support", removing extra WSA calls.
This commit is contained in:
1 parent
0aa899ea0b
commit
9e08f24769
1 file changed
+4
-11
+4
-11
@@ -239,13 +239,8 @@ void __NetInit() {
|
||||
{
|
||||
PPSSPP_ID = getPPSSPPInstanceNumber(); // This should be called when program started instead of when the game started/reseted
|
||||
}
|
||||
#ifdef _WIN32
|
||||
WSADATA data;
|
||||
int iResult = WSAStartup(MAKEWORD(2, 2), &data);
|
||||
if (iResult != NOERROR) {
|
||||
ERROR_LOG(SCENET, "WSA Failed");
|
||||
}
|
||||
#endif
|
||||
|
||||
net::Init();
|
||||
InitLocalIP();
|
||||
INFO_LOG(SCENET, "LocalHost IP will be %s", inet_ntoa(((sockaddr_in*)&localIP)->sin_addr));
|
||||
//net::Init();
|
||||
@@ -254,10 +249,8 @@ void __NetInit() {
|
||||
|
||||
void __NetShutdown() {
|
||||
__ResetInitNetLib();
|
||||
//net::Shutdown();
|
||||
#ifdef _WIN32
|
||||
WSACleanup();
|
||||
#endif
|
||||
|
||||
net::Shutdown();
|
||||
//PPSSPPIDCleanup(); // To make the ID/IP persistent on every reset, we should just let the OS closes all open handles instead of calling PPSSPPIDCleanup() on every reset
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user