summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Emmanuel Gil Peyrot2015-06-20 20:11:32 +0100
committerGravatar Emmanuel Gil Peyrot2015-06-27 14:43:56 +0100
commitc34524743168af08812894ae635cd837fc77d403 (patch)
tree95225a8b52d44f96a2f4d76ffb0bf55d0005db19
parentCommon: Remove unused fifo_queue.h. (diff)
downloadyuzu-c34524743168af08812894ae635cd837fc77d403.tar.gz
yuzu-c34524743168af08812894ae635cd837fc77d403.tar.xz
yuzu-c34524743168af08812894ae635cd837fc77d403.zip
Services: Use the standard _WIN32 define in soc:U instead of our own EMU_PLATFORM.
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/soc_u.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/core/hle/service/soc_u.cpp b/src/core/hle/service/soc_u.cpp
index 1e0f5df9b..6a2cab414 100644
--- a/src/core/hle/service/soc_u.cpp
+++ b/src/core/hle/service/soc_u.cpp
@@ -3,9 +3,8 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "common/logging/log.h" 5#include "common/logging/log.h"
6#include "common/platform.h"
7 6
8#if EMU_PLATFORM == PLATFORM_WINDOWS 7#ifdef _WIN32
9#include <winsock2.h> 8#include <winsock2.h>
10#include <ws2tcpip.h> 9#include <ws2tcpip.h>
11 10
@@ -35,7 +34,7 @@
35#include "core/hle/service/soc_u.h" 34#include "core/hle/service/soc_u.h"
36#include <unordered_map> 35#include <unordered_map>
37 36
38#if EMU_PLATFORM == PLATFORM_WINDOWS 37#ifdef _WIN32
39# define WSAEAGAIN WSAEWOULDBLOCK 38# define WSAEAGAIN WSAEWOULDBLOCK
40# define WSAEMULTIHOP -1 // Invalid dummy value 39# define WSAEMULTIHOP -1 // Invalid dummy value
41# define ERRNO(x) WSA##x 40# define ERRNO(x) WSA##x
@@ -369,7 +368,7 @@ static void Fcntl(Service::Interface* self) {
369 }); 368 });
370 369
371 if (ctr_cmd == 3) { // F_GETFL 370 if (ctr_cmd == 3) { // F_GETFL
372#if EMU_PLATFORM == PLATFORM_WINDOWS 371#ifdef _WIN32
373 posix_ret = 0; 372 posix_ret = 0;
374 auto iter = open_sockets.find(socket_handle); 373 auto iter = open_sockets.find(socket_handle);
375 if (iter != open_sockets.end() && iter->second.blocking == false) 374 if (iter != open_sockets.end() && iter->second.blocking == false)
@@ -386,7 +385,7 @@ static void Fcntl(Service::Interface* self) {
386 posix_ret |= 4; // O_NONBLOCK 385 posix_ret |= 4; // O_NONBLOCK
387#endif 386#endif
388 } else if (ctr_cmd == 4) { // F_SETFL 387 } else if (ctr_cmd == 4) { // F_SETFL
389#if EMU_PLATFORM == PLATFORM_WINDOWS 388#ifdef _WIN32
390 unsigned long tmp = (ctr_arg & 4 /* O_NONBLOCK */) ? 1 : 0; 389 unsigned long tmp = (ctr_arg & 4 /* O_NONBLOCK */) ? 1 : 0;
391 int ret = ioctlsocket(socket_handle, FIONBIO, &tmp); 390 int ret = ioctlsocket(socket_handle, FIONBIO, &tmp);
392 if (ret == SOCKET_ERROR_VALUE) { 391 if (ret == SOCKET_ERROR_VALUE) {
@@ -675,7 +674,7 @@ static void Connect(Service::Interface* self) {
675 674
676static void InitializeSockets(Service::Interface* self) { 675static void InitializeSockets(Service::Interface* self) {
677 // TODO(Subv): Implement 676 // TODO(Subv): Implement
678#if EMU_PLATFORM == PLATFORM_WINDOWS 677#ifdef _WIN32
679 WSADATA data; 678 WSADATA data;
680 WSAStartup(MAKEWORD(2, 2), &data); 679 WSAStartup(MAKEWORD(2, 2), &data);
681#endif 680#endif
@@ -688,7 +687,7 @@ static void ShutdownSockets(Service::Interface* self) {
688 // TODO(Subv): Implement 687 // TODO(Subv): Implement
689 CleanupSockets(); 688 CleanupSockets();
690 689
691#if EMU_PLATFORM == PLATFORM_WINDOWS 690#ifdef _WIN32
692 WSACleanup(); 691 WSACleanup();
693#endif 692#endif
694 693
@@ -739,7 +738,7 @@ Interface::Interface() {
739 738
740Interface::~Interface() { 739Interface::~Interface() {
741 CleanupSockets(); 740 CleanupSockets();
742#if EMU_PLATFORM == PLATFORM_WINDOWS 741#ifdef _WIN32
743 WSACleanup(); 742 WSACleanup();
744#endif 743#endif
745} 744}