Sunshine latest
Self-hosted game stream host for Moonlight.
misc.h
Go to the documentation of this file.
1
5#pragma once
6
7// standard includes
8#include <chrono>
9#include <string_view>
10
11// platform includes
12#include <windows.h>
13#include <winnt.h>
14
15namespace platf {
16 void print_status(const std::string_view &prefix, HRESULT status);
17 HDESK syncThreadDesktop();
18
19 int64_t qpc_counter();
20
21 std::chrono::nanoseconds qpc_time_difference(int64_t performance_counter1, int64_t performance_counter2);
22
28 std::wstring from_utf8(const std::string &string);
29
35 std::string to_utf8(const std::wstring &string);
36} // namespace platf
std::wstring from_utf8(const std::string &string)
Convert a UTF-8 string into a UTF-16 wide string.
Definition misc.cpp:1690
std::string to_utf8(const std::wstring &string)
Convert a UTF-16 wide string into a UTF-8 string.
Definition misc.cpp:1716