mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
pkg/macos: add CVDisplayLinkSetCurrentCGDisplay
This commit is contained in:
@ -36,6 +36,17 @@ pub const DisplayLink = opaque {
|
|||||||
return c.CVDisplayLinkIsRunning(@ptrCast(self)) != 0;
|
return c.CVDisplayLinkIsRunning(@ptrCast(self)) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn setCurrentCGDisplay(
|
||||||
|
self: *DisplayLink,
|
||||||
|
display_id: c.CGDirectDisplayID,
|
||||||
|
) Error!void {
|
||||||
|
if (c.CVDisplayLinkSetCurrentCGDisplay(
|
||||||
|
@ptrCast(self),
|
||||||
|
display_id,
|
||||||
|
) != c.kCVReturnSuccess)
|
||||||
|
return error.InvalidOperation;
|
||||||
|
}
|
||||||
|
|
||||||
// Note: this purposely throws away a ton of arguments I didn't need.
|
// Note: this purposely throws away a ton of arguments I didn't need.
|
||||||
// It would be trivial to refactor this into Zig types and properly
|
// It would be trivial to refactor this into Zig types and properly
|
||||||
// pass this through.
|
// pass this through.
|
||||||
|
Reference in New Issue
Block a user