---
title: "CVDisplayLinkSetCurrentCGDisplay(_:_:)"
framework: corevideo
role: symbol
role_heading: Function
path: "corevideo/cvdisplaylinksetcurrentcgdisplay(_:_:)"
---

# CVDisplayLinkSetCurrentCGDisplay(_:_:)

Sets the current display of a display link.

## Declaration

```swift
func CVDisplayLinkSetCurrentCGDisplay(_ displayLink: CVDisplayLink, _ displayID: CGDirectDisplayID) -> CVReturn
```

## Parameters

- `displayLink`: The display link whose display you want to set.
- `displayID`: The ID of the display to be set.

## Return Value

Return Value A Core Video result code. See Core Video Constants for possible values.

## Discussion

Discussion Although it is safe to call this function on a running display link, a discontinuity may appear in the video timestamp.

## See Also

### Configuring Display Links

- [CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(_:_:_:)](corevideo/cvdisplaylinksetcurrentcgdisplayfromopenglcontext(_:_:_:).md)
- [CVDisplayLinkSetOutputCallback(_:_:_:)](corevideo/cvdisplaylinksetoutputcallback(_:_:_:).md)
- [CVDisplayLinkSetOutputHandler(_:_:)](corevideo/cvdisplaylinksetoutputhandler(_:_:).md)
- [CVDisplayLinkOutputHandler](corevideo/cvdisplaylinkoutputhandler.md)
