I am developing Mac desktop application, where i am capturing the screen using
CGImageRef screenShot = CGWindowListCreateImage(CGRectInfinite, kCGWindowListOptionAll, kCGNullWindowID, kCGWindowImageDefault);
and display the screen shot, The problem is, i am expecting it should show the mouse cursor too, but its not showing, do i need to enable any settings for that ?
I tried following before calling this function
CGDisplayShowCursor(kCGDirectMainDisplay);
CGAssociateMouseAndMouseCursorPosition(true);
but it didn't work, When i checked using following
bool bCursor = CGCursorIsDrawnInFramebuffer(); /* This returns false */
bCursor = CGCursorIsVisible(); /* This returns true */
This values says, cursor was not drawn in the framebuffer ( ) but cursor is visible, I suppose only i need to do is, Draw cursor in the framebuffer, but how that is the challenge,
Thanks in advance.
it seems, framebuffer doesn't give me the mouse cursor, so i am drawing my own, this is the code snippet , might be help full to you guys,