|
Sunshine master
Self-hosted game stream host for Moonlight.
|
Miscellaneous declarations for Windows. More...
#include <chrono>#include <filesystem>#include <string>#include <string_view>#include <Windows.h>#include <winnt.h>Go to the source code of this file.
Functions | |
| bool | platf::getFileVersionInfo (const std::filesystem::path &file_path, std::string &version_str) |
| Get file version information from a Windows executable or driver file. | |
| void | platf::print_status (const std::string_view &prefix, HRESULT status) |
| Write status details to the log. | |
| int64_t | platf::qpc_counter () |
| Read the current Windows high-resolution performance counter. | |
| std::chrono::nanoseconds | platf::qpc_time_difference (int64_t performance_counter1, int64_t performance_counter2) |
| Convert the difference between two QPC readings to nanoseconds. | |
| HDESK | platf::syncThreadDesktop () |
| Synchronize thread desktop. | |
Miscellaneous declarations for Windows.
| bool platf::getFileVersionInfo | ( | const std::filesystem::path & | file_path, |
| std::string & | version_str ) |
Get file version information from a Windows executable or driver file.
| file_path | Path to the file to query. |
| version_str | Output parameter for version string in format "major.minor.build.revision". |
| void platf::print_status | ( | const std::string_view & | prefix, |
| HRESULT | status ) |
Write status details to the log.
| prefix | Text prefix used when formatting the message. |
| status | Native status code returned by the platform API. |
| int64_t platf::qpc_counter | ( | ) |
Read the current Windows high-resolution performance counter.
QueryPerformanceCounter. | std::chrono::nanoseconds platf::qpc_time_difference | ( | int64_t | performance_counter1, |
| int64_t | performance_counter2 ) |
Convert the difference between two QPC readings to nanoseconds.
| performance_counter1 | Newer performance-counter reading. |
| performance_counter2 | Older performance-counter reading. |
| HDESK platf::syncThreadDesktop | ( | ) |
Synchronize thread desktop.