Merge remote-tracking branch 'origin/master'

This commit is contained in:
Yukino Song
2024-12-02 02:11:15 +08:00
45 changed files with 983 additions and 498 deletions

View File

@@ -1896,6 +1896,16 @@ namespace platf {
return output;
}
std::string
get_host_name() {
WCHAR hostname[256];
if (GetHostNameW(hostname, ARRAYSIZE(hostname)) == SOCKET_ERROR) {
BOOST_LOG(error) << "GetHostNameW() failed: "sv << WSAGetLastError();
return "Sunshine"s;
}
return to_utf8(hostname);
}
class win32_high_precision_timer: public high_precision_timer {
public:
win32_high_precision_timer() {