diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/network/network.cpp | 6 | ||||
| -rw-r--r-- | src/core/network/sockets.h | 4 | ||||
| -rw-r--r-- | src/video_core/shader/ast.cpp | 9 |
3 files changed, 9 insertions, 10 deletions
diff --git a/src/core/network/network.cpp b/src/core/network/network.cpp index 5ef2e8511..5a8cc6fc2 100644 --- a/src/core/network/network.cpp +++ b/src/core/network/network.cpp | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | #ifdef _WIN32 | 11 | #ifdef _WIN32 |
| 12 | #define _WINSOCK_DEPRECATED_NO_WARNINGS // gethostname | 12 | #define _WINSOCK_DEPRECATED_NO_WARNINGS // gethostname |
| 13 | #include <winsock2.h> | 13 | #include <winsock2.h> |
| 14 | #elif __unix__ | 14 | #elif YUZU_UNIX |
| 15 | #include <errno.h> | 15 | #include <errno.h> |
| 16 | #include <fcntl.h> | 16 | #include <fcntl.h> |
| 17 | #include <netdb.h> | 17 | #include <netdb.h> |
| @@ -54,7 +54,7 @@ constexpr IPv4Address TranslateIPv4(in_addr addr) { | |||
| 54 | sockaddr TranslateFromSockAddrIn(SockAddrIn input) { | 54 | sockaddr TranslateFromSockAddrIn(SockAddrIn input) { |
| 55 | sockaddr_in result; | 55 | sockaddr_in result; |
| 56 | 56 | ||
| 57 | #ifdef __unix__ | 57 | #if YUZU_UNIX |
| 58 | result.sin_len = sizeof(result); | 58 | result.sin_len = sizeof(result); |
| 59 | #endif | 59 | #endif |
| 60 | 60 | ||
| @@ -99,7 +99,7 @@ bool EnableNonBlock(SOCKET fd, bool enable) { | |||
| 99 | return ioctlsocket(fd, FIONBIO, &value) != SOCKET_ERROR; | 99 | return ioctlsocket(fd, FIONBIO, &value) != SOCKET_ERROR; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | #elif __unix__ // ^ _WIN32 v __unix__ | 102 | #elif YUZU_UNIX // ^ _WIN32 v YUZU_UNIX |
| 103 | 103 | ||
| 104 | using SOCKET = int; | 104 | using SOCKET = int; |
| 105 | using WSAPOLLFD = pollfd; | 105 | using WSAPOLLFD = pollfd; |
diff --git a/src/core/network/sockets.h b/src/core/network/sockets.h index 7bdff0fe4..a44393325 100644 --- a/src/core/network/sockets.h +++ b/src/core/network/sockets.h | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | #if defined(_WIN32) | 10 | #if defined(_WIN32) |
| 11 | #include <winsock.h> | 11 | #include <winsock.h> |
| 12 | #elif !defined(__unix__) | 12 | #elif !YUZU_UNIX |
| 13 | #error "Platform not implemented" | 13 | #error "Platform not implemented" |
| 14 | #endif | 14 | #endif |
| 15 | 15 | ||
| @@ -84,7 +84,7 @@ public: | |||
| 84 | 84 | ||
| 85 | #if defined(_WIN32) | 85 | #if defined(_WIN32) |
| 86 | SOCKET fd = INVALID_SOCKET; | 86 | SOCKET fd = INVALID_SOCKET; |
| 87 | #elif defined(__unix__) | 87 | #elif YUZU_UNIX |
| 88 | int fd = -1; | 88 | int fd = -1; |
| 89 | #endif | 89 | #endif |
| 90 | }; | 90 | }; |
diff --git a/src/video_core/shader/ast.cpp b/src/video_core/shader/ast.cpp index cc2dbe36c..db11144c7 100644 --- a/src/video_core/shader/ast.cpp +++ b/src/video_core/shader/ast.cpp | |||
| @@ -212,16 +212,15 @@ public: | |||
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | void operator()(const ExprPredicate& expr) { | 214 | void operator()(const ExprPredicate& expr) { |
| 215 | inner += "P" + std::to_string(expr.predicate); | 215 | inner += fmt::format("P{}", expr.predicate); |
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | void operator()(const ExprCondCode& expr) { | 218 | void operator()(const ExprCondCode& expr) { |
| 219 | u32 cc = static_cast<u32>(expr.cc); | 219 | inner += fmt::format("CC{}", expr.cc); |
| 220 | inner += "CC" + std::to_string(cc); | ||
| 221 | } | 220 | } |
| 222 | 221 | ||
| 223 | void operator()(const ExprVar& expr) { | 222 | void operator()(const ExprVar& expr) { |
| 224 | inner += "V" + std::to_string(expr.var_index); | 223 | inner += fmt::format("V{}", expr.var_index); |
| 225 | } | 224 | } |
| 226 | 225 | ||
| 227 | void operator()(const ExprBoolean& expr) { | 226 | void operator()(const ExprBoolean& expr) { |
| @@ -229,7 +228,7 @@ public: | |||
| 229 | } | 228 | } |
| 230 | 229 | ||
| 231 | void operator()(const ExprGprEqual& expr) { | 230 | void operator()(const ExprGprEqual& expr) { |
| 232 | inner += "( gpr_" + std::to_string(expr.gpr) + " == " + std::to_string(expr.value) + ')'; | 231 | inner += fmt::format("(gpr_{} == {})", expr.gpr, expr.value); |
| 233 | } | 232 | } |
| 234 | 233 | ||
| 235 | const std::string& GetResult() const { | 234 | const std::string& GetResult() const { |