diff --git a/include/internal/SCCommon.h b/include/internal/SCCommon.h index b5e95c4..a2aae09 100644 --- a/include/internal/SCCommon.h +++ b/include/internal/SCCommon.h @@ -7,14 +7,14 @@ namespace SL { namespace Screen_Capture { template struct CaptureData { -#if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L +#if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L && !defined(__MINGW32__) std::atomic > FrameTimer; #else std::shared_ptr FrameTimer; #endif F OnNewFrame; F OnFrameChanged; -#if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L +#if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L && !defined(__MINGW32__) std::atomic > MouseTimer; #else std::shared_ptr MouseTimer; diff --git a/include/internal/ThreadManager.h b/include/internal/ThreadManager.h index fe63940..01a6f17 100644 --- a/include/internal/ThreadManager.h +++ b/include/internal/ThreadManager.h @@ -99,7 +99,7 @@ namespace Screen_Capture { // get a copy of the shared_ptr in a safe way frameprocessor.Resume(); -#if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L +#if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L && !defined(__MINGW32__) auto timer = data->ScreenCaptureData.FrameTimer.load(); #else auto timer = std::atomic_load(&data->ScreenCaptureData.FrameTimer); @@ -149,7 +149,7 @@ namespace Screen_Capture { } while (!data->CommonData_.TerminateThreadsEvent) { // get a copy of the shared_ptr in a safe way -#if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L +#if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L && !defined(__MINGW32__) auto timer = data->WindowCaptureData.FrameTimer.load(); #else auto timer = std::atomic_load(&data->WindowCaptureData.FrameTimer); diff --git a/src_cpp/CMakeLists.txt b/src_cpp/CMakeLists.txt index 66765f0..9d1ecc8 100644 --- a/src_cpp/CMakeLists.txt +++ b/src_cpp/CMakeLists.txt @@ -87,7 +87,9 @@ add_library(${PROJECT_NAME}_static STATIC ${libsrc}) set_target_properties(${PROJECT_NAME}_shared PROPERTIES DEFINE_SYMBOL SC_LITE_DLL) if(WIN32) target_link_libraries(${PROJECT_NAME}_shared Dwmapi) - install (FILES $ DESTINATION bin OPTIONAL) + if (!MINGW) + install (FILES $ DESTINATION bin OPTIONAL) + endif() elseif(APPLE) find_package(Threads REQUIRED) find_library(corefoundation_lib CoreFoundation REQUIRED) @@ -125,4 +127,4 @@ add_library(${PROJECT_NAME}_static STATIC ${libsrc}) ${CMAKE_THREAD_LIBS_INIT} ) endif() - \ No newline at end of file + diff --git a/src_cpp/ScreenCapture.cpp b/src_cpp/ScreenCapture.cpp index 21b1e1b..b20f7cb 100644 --- a/src_cpp/ScreenCapture.cpp +++ b/src_cpp/ScreenCapture.cpp @@ -128,7 +128,7 @@ class ScreenCaptureManager : public IScreenCaptureManager { virtual void setFrameChangeInterval(const std::shared_ptr &timer) override { -#if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L +#if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L && !defined(__MINGW32__) Thread_Data_->ScreenCaptureData.FrameTimer.store(timer); Thread_Data_->WindowCaptureData.FrameTimer.store(timer); #else @@ -139,7 +139,7 @@ class ScreenCaptureManager : public IScreenCaptureManager { virtual void setMouseChangeInterval(const std::shared_ptr &timer) override { -#if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L +#if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L && !defined(__MINGW32__) Thread_Data_->ScreenCaptureData.MouseTimer.store(timer); Thread_Data_->WindowCaptureData.MouseTimer.store(timer); #else