From f267b76d57e7ac90f6985304d72280d1200d3ed2 Mon Sep 17 00:00:00 2001 From: ggq Date: Wed, 22 Mar 2023 09:58:34 +0800 Subject: [PATCH] Add CREATE_WAITABLE_TIMER_HIGH_RESOLUTION define to avoid compile errors for low system versions --- src/platform/windows/display_base.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/platform/windows/display_base.cpp b/src/platform/windows/display_base.cpp index 39be11127f2..681dc16d043 100644 --- a/src/platform/windows/display_base.cpp +++ b/src/platform/windows/display_base.cpp @@ -24,6 +24,10 @@ using namespace std::literals; } namespace platf::dxgi { namespace bp = boost::process; +// Avoid compilation errors for low system versions +#ifndef CREATE_WAITABLE_TIMER_HIGH_RESOLUTION +#define CREATE_WAITABLE_TIMER_HIGH_RESOLUTION 0x00000002 +#endif capture_e duplication_t::next_frame(DXGI_OUTDUPL_FRAME_INFO &frame_info, std::chrono::milliseconds timeout, resource_t::pointer *res_p) { auto capture_status = release_frame();