Add high_precision_sleep() method

This commit is contained in:
ns6089
2023-05-12 16:57:09 +03:00
committed by Cameron Gutman
parent 8dc51a21df
commit d81e2cecaa
2 changed files with 41 additions and 21 deletions

View File

@@ -126,6 +126,9 @@ namespace platf::dxgi {
int
init(const ::video::config_t &config, const std::string &display_name);
void
high_precision_sleep(std::chrono::nanoseconds duration);
capture_e
capture(const push_captured_image_cb_t &push_captured_image_cb, const pull_free_image_cb_t &pull_free_image_cb, bool *cursor) override;
@@ -141,6 +144,8 @@ namespace platf::dxgi {
DXGI_FORMAT capture_format;
D3D_FEATURE_LEVEL feature_level;
util::safe_ptr_v2<std::remove_pointer_t<HANDLE>, BOOL, CloseHandle> timer;
typedef enum _D3DKMT_SCHEDULINGPRIORITYCLASS {
D3DKMT_SCHEDULINGPRIORITYCLASS_IDLE,
D3DKMT_SCHEDULINGPRIORITYCLASS_BELOW_NORMAL,