File tree 4 files changed +10
-8
lines changed
4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 7
7
namespace SL {
8
8
namespace Screen_Capture {
9
9
template <typename F, typename M, typename W> struct CaptureData {
10
- #if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L
10
+ #if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L && !defined(__MINGW32__)
11
11
std::atomic<std::shared_ptr<Timer> > FrameTimer;
12
12
#else
13
13
std::shared_ptr<Timer> FrameTimer;
14
14
#endif
15
15
F OnNewFrame;
16
16
F OnFrameChanged;
17
- #if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L
17
+ #if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L && !defined(__MINGW32__)
18
18
std::atomic<std::shared_ptr<Timer> > MouseTimer;
19
19
#else
20
20
std::shared_ptr<Timer> MouseTimer;
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ namespace Screen_Capture {
99
99
// get a copy of the shared_ptr in a safe way
100
100
101
101
frameprocessor.Resume ();
102
- #if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L
102
+ #if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L && !defined(__MINGW32__)
103
103
auto timer = data->ScreenCaptureData .FrameTimer .load ();
104
104
#else
105
105
auto timer = std::atomic_load (&data->ScreenCaptureData .FrameTimer );
@@ -149,7 +149,7 @@ namespace Screen_Capture {
149
149
}
150
150
while (!data->CommonData_ .TerminateThreadsEvent ) {
151
151
// get a copy of the shared_ptr in a safe way
152
- #if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L
152
+ #if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L && !defined(__MINGW32__)
153
153
auto timer = data->WindowCaptureData .FrameTimer .load ();
154
154
#else
155
155
auto timer = std::atomic_load (&data->WindowCaptureData .FrameTimer );
Original file line number Diff line number Diff line change @@ -87,7 +87,9 @@ add_library(${PROJECT_NAME}_static STATIC ${libsrc})
87
87
set_target_properties (${PROJECT_NAME} _shared PROPERTIES DEFINE_SYMBOL SC_LITE_DLL)
88
88
if (WIN32 )
89
89
target_link_libraries (${PROJECT_NAME} _shared Dwmapi)
90
- install (FILES $<TARGET_PDB_FILE:${PROJECT_NAME} _shared> DESTINATION bin OPTIONAL )
90
+ if (!MINGW)
91
+ install (FILES $<TARGET_PDB_FILE:${PROJECT_NAME} _shared> DESTINATION bin OPTIONAL )
92
+ endif ()
91
93
elseif (APPLE )
92
94
find_package (Threads REQUIRED)
93
95
find_library (corefoundation_lib CoreFoundation REQUIRED)
@@ -125,4 +127,4 @@ add_library(${PROJECT_NAME}_static STATIC ${libsrc})
125
127
${CMAKE_THREAD_LIBS_INIT}
126
128
)
127
129
endif ()
128
-
130
+
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ class ScreenCaptureManager : public IScreenCaptureManager {
128
128
129
129
virtual void setFrameChangeInterval (const std::shared_ptr<Timer> &timer) override
130
130
{
131
- #if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L
131
+ #if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L && !defined(__MINGW32__)
132
132
Thread_Data_->ScreenCaptureData .FrameTimer .store (timer);
133
133
Thread_Data_->WindowCaptureData .FrameTimer .store (timer);
134
134
#else
@@ -139,7 +139,7 @@ class ScreenCaptureManager : public IScreenCaptureManager {
139
139
140
140
virtual void setMouseChangeInterval (const std::shared_ptr<Timer> &timer) override
141
141
{
142
- #if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L
142
+ #if defined(_WIN32) && defined(__cplusplus) && __cplusplus >= 202002L && !defined(__MINGW32__)
143
143
Thread_Data_->ScreenCaptureData .MouseTimer .store (timer);
144
144
Thread_Data_->WindowCaptureData .MouseTimer .store (timer);
145
145
#else
You can’t perform that action at this time.
0 commit comments