Added boolean to determine if screen capture is allowed.