Windows: Check WSAStartup result
This commit is contained in:
+5
-2
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user