mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00: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.");
|
||||
}
|
||||
|
||||
WSADATA wsa_data;
|
||||
WSAStartup(MAKEWORD(2, 2), &wsa_data);
|
||||
WSADATA 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
|
||||
|
||||
ensure(thread_ctrl::is_main(), "Not main thread");
|
||||
|
|
Loading…
Add table
Reference in a new issue