Skip to content

Commit

Permalink
Fixed Apple build
Browse files Browse the repository at this point in the history
  • Loading branch information
smasherprog committed Jan 8, 2017
1 parent 405a83c commit 6f78284
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Example/Screen_Capture_Example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
int main()
{

std::atomic<int> realcounter = 0;
std::atomic<int> realcounter;
realcounter= 0;
SL::Screen_Capture::ScreenCaptureManager framgrabber;
auto monitors = SL::Screen_Capture::GetMonitors();
std::vector<std::unique_ptr<char[]>> images;//this is the actual backing of the image
Expand Down
4 changes: 2 additions & 2 deletions src/ios/CGFrameProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ namespace SL {
if (_CGFrameProcessorImpl->Data->CaptureDifMonitor) {
if (_CGFrameProcessorImpl->FirstRun) {
//first time through, just send the whole image
auto wholeimgfirst = CreateImage(ret, PixelStride, 0, _GDIFrameProcessorImpl->NewImageBuffer.get());
_CGFrameProcessorImpl->Data->CaptureEntireMonitor(*wholeimgfirst, *_GDIFrameProcessorImpl->Data->SelectedMonitor);
auto wholeimgfirst = CreateImage(imgrect, PixelStride, 0, _CGFrameProcessorImpl->NewImageBuffer.get());
_CGFrameProcessorImpl->Data->CaptureDifMonitor(*wholeimgfirst, *_CGFrameProcessorImpl->Data->SelectedMonitor);
_CGFrameProcessorImpl->FirstRun = false;
} else {

Expand Down
2 changes: 1 addition & 1 deletion src/ios/GetMonitors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace SL{
auto r = CGDisplayBounds(displays[i]);

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

Expand Down

0 comments on commit 6f78284

Please sign in to comment.