Re: CGDisplayCapture question
Re: CGDisplayCapture question
- Subject: Re: CGDisplayCapture question
- From: Mike Paquette <email@hidden>
- Date: Wed, 14 Jul 2004 20:10:07 -0700
You don't need to capture the displays to change the display mode.
Display capture is a way of effectively removing a display from the
window system, intended primarily to support ports of immersive
environments that generate their own user interface, such as games.
Mike Paquette
On Jul 14, 2004, at 7:45 PM, Jim O'Connor wrote:
However, if I want to reset the screen resolution then things don't go
properly when I want to reposition the window.
CGGetDisplaysWithRect(cgRect, 1, &sDisplayID, &count);
sOldDict = CGDisplayCurrentMode(sDisplayID);
CFDictionaryRef dict = CGDisplayBestModeForParameters(sDisplayID,
CGDisplayBitsPerPixel(sDisplayID), 832, 624, NULL);
bool capture = CGDisplayCapture(sDisplayID) == kCGErrorSuccess;
CGDisplaySwitchToMode(sDisplayID, dict);
[[mView window] setLevel:NSScreenSaverWindowLevel];
[[mView window] setFrame:[NSWindow frameRectForContentRect:[[[mView
window] screen] frame] styleMask:[[mView window] styleMask]]
display:true
animate:/*true*/false];
CGDisplayRelease(sDisplayID);
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.