Sunshine latest
Self-hosted game stream host for Moonlight.
misc.h File Reference

Miscellaneous declarations for Windows. More...

#include <chrono>
#include <string_view>
#include <windows.h>
#include <winnt.h>
Include dependency graph for misc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::wstring platf::from_utf8 (const std::string &string)
 Convert a UTF-8 string into a UTF-16 wide string.
 
void platf::print_status (const std::string_view &prefix, HRESULT status)
 
int64_t platf::qpc_counter ()
 
std::chrono::nanoseconds platf::qpc_time_difference (int64_t performance_counter1, int64_t performance_counter2)
 
HDESK platf::syncThreadDesktop ()
 
std::string platf::to_utf8 (const std::wstring &string)
 Convert a UTF-16 wide string into a UTF-8 string.
 

Detailed Description

Miscellaneous declarations for Windows.

Function Documentation

◆ from_utf8()

std::wstring platf::from_utf8 ( const std::string & string)

Convert a UTF-8 string into a UTF-16 wide string.

Parameters
stringThe UTF-8 string.
Returns
The converted UTF-16 wide string.

◆ to_utf8()

std::string platf::to_utf8 ( const std::wstring & string)

Convert a UTF-16 wide string into a UTF-8 string.

Parameters
stringThe UTF-16 wide string.
Returns
The converted UTF-8 string.