Skip to content

Commit 6f78284

Browse files
committed
Fixed Apple build
1 parent 405a83c commit 6f78284

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Example/Screen_Capture_Example.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
int main()
1212
{
1313

14-
std::atomic<int> realcounter = 0;
14+
std::atomic<int> realcounter;
15+
realcounter= 0;
1516
SL::Screen_Capture::ScreenCaptureManager framgrabber;
1617
auto monitors = SL::Screen_Capture::GetMonitors();
1718
std::vector<std::unique_ptr<char[]>> images;//this is the actual backing of the image

src/ios/CGFrameProcessor.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ namespace SL {
7272
if (_CGFrameProcessorImpl->Data->CaptureDifMonitor) {
7373
if (_CGFrameProcessorImpl->FirstRun) {
7474
//first time through, just send the whole image
75-
auto wholeimgfirst = CreateImage(ret, PixelStride, 0, _GDIFrameProcessorImpl->NewImageBuffer.get());
76-
_CGFrameProcessorImpl->Data->CaptureEntireMonitor(*wholeimgfirst, *_GDIFrameProcessorImpl->Data->SelectedMonitor);
75+
auto wholeimgfirst = CreateImage(imgrect, PixelStride, 0, _CGFrameProcessorImpl->NewImageBuffer.get());
76+
_CGFrameProcessorImpl->Data->CaptureDifMonitor(*wholeimgfirst, *_CGFrameProcessorImpl->Data->SelectedMonitor);
7777
_CGFrameProcessorImpl->FirstRun = false;
7878
} else {
7979

src/ios/GetMonitors.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace SL{
1919
auto r = CGDisplayBounds(displays[i]);
2020

2121
auto name = std::string("Monitor ") + std::to_string(displays[i]);
22-
ret.push_back(CreateMonitor(displays[i], int(r.size.height),int(r.size.width), int(r.origin.x), int(r.origin.y), name ));
22+
ret.push_back(CreateMonitor(i, displays[i], int(r.size.height),int(r.size.width), int(r.origin.x), int(r.origin.y), name ));
2323
}
2424
return ret;
2525

0 commit comments

Comments
 (0)