diff options
author | Lioncash <mathew1800@gmail.com> | 2020-10-13 14:10:50 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-10-13 19:16:49 +0200 |
commit | 39c8d18feba8eafcd43fbb55e73ae150a1947aad (patch) | |
tree | 9565ff464bbb9e5a0aa66e6e310098314e88d019 /src/core/hle/service/sockets/sockets_translate.cpp | |
parent | Merge pull request #3929 from FearlessTobi/ticket-keys (diff) | |
download | yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.tar yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.tar.gz yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.tar.bz2 yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.tar.lz yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.tar.xz yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.tar.zst yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.zip |
Diffstat (limited to 'src/core/hle/service/sockets/sockets_translate.cpp')
-rw-r--r-- | src/core/hle/service/sockets/sockets_translate.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/service/sockets/sockets_translate.cpp b/src/core/hle/service/sockets/sockets_translate.cpp index 139743e1d..2e626fd86 100644 --- a/src/core/hle/service/sockets/sockets_translate.cpp +++ b/src/core/hle/service/sockets/sockets_translate.cpp @@ -89,9 +89,9 @@ Network::Protocol Translate(Type type, Protocol protocol) { } } -u16 TranslatePollEventsToHost(u16 flags) { - u16 result = 0; - const auto translate = [&result, &flags](u16 from, u16 to) { +u16 TranslatePollEventsToHost(u32 flags) { + u32 result = 0; + const auto translate = [&result, &flags](u32 from, u32 to) { if ((flags & from) != 0) { flags &= ~from; result |= to; @@ -105,12 +105,12 @@ u16 TranslatePollEventsToHost(u16 flags) { translate(POLL_NVAL, Network::POLL_NVAL); UNIMPLEMENTED_IF_MSG(flags != 0, "Unimplemented flags={}", flags); - return result; + return static_cast<u16>(result); } -u16 TranslatePollEventsToGuest(u16 flags) { - u16 result = 0; - const auto translate = [&result, &flags](u16 from, u16 to) { +u16 TranslatePollEventsToGuest(u32 flags) { + u32 result = 0; + const auto translate = [&result, &flags](u32 from, u32 to) { if ((flags & from) != 0) { flags &= ~from; result |= to; @@ -125,7 +125,7 @@ u16 TranslatePollEventsToGuest(u16 flags) { translate(Network::POLL_NVAL, POLL_NVAL); UNIMPLEMENTED_IF_MSG(flags != 0, "Unimplemented flags={}", flags); - return result; + return static_cast<u16>(result); } Network::SockAddrIn Translate(SockAddrIn value) { |