mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 07:51:28 +12:00
Windows: Check WSAStartup result
This commit is contained in:
parent
69e4138223
commit
b49f8623f6
1 changed files with 5 additions and 2 deletions
|
@ -490,8 +490,11 @@ int main(int argc, char** argv)
|
||||||
report_fatal_error("Not enough memory for RPCS3 process.");
|
report_fatal_error("Not enough memory for RPCS3 process.");
|
||||||
}
|
}
|
||||||
|
|
||||||
WSADATA wsa_data;
|
WSADATA wsa_data{};
|
||||||
WSAStartup(MAKEWORD(2, 2), &wsa_data);
|
if (const int res = WSAStartup(MAKEWORD(2, 2), &wsa_data); res != 0)
|
||||||
|
{
|
||||||
|
report_fatal_error(fmt::format("WSAStartup failed (error=%s)", fmt::win_error_to_string(res, nullptr)));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ensure(thread_ctrl::is_main(), "Not main thread");
|
ensure(thread_ctrl::is_main(), "Not main thread");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue