mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-10 04:40:05 +00:00
Add Artic Base support
This commit is contained in:
parent
b5126f979c
commit
78c48a46e0
77 changed files with 5467 additions and 501 deletions
31
src/network/socket_manager.cpp
Normal file
31
src/network/socket_manager.cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Copyright 2024 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
#include "socket_manager.h"
|
||||
|
||||
namespace Network {
|
||||
std::atomic<u32> SocketManager::count = 0;
|
||||
|
||||
void SocketManager::EnableSockets() {
|
||||
if (count++ == 0) {
|
||||
#ifdef _WIN32
|
||||
WSADATA data;
|
||||
WSAStartup(MAKEWORD(2, 2), &data);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void SocketManager::DisableSockets() {
|
||||
if (--count == 0) {
|
||||
#ifdef _WIN32
|
||||
WSACleanup();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} // namespace Network
|
Loading…
Add table
Add a link
Reference in a new issue