Re: CGDisplayCapture question
Re: CGDisplayCapture question
- Subject: Re: CGDisplayCapture question
- From: "Jim O'Connor" <email@hidden>
- Date: Thu, 15 Jul 2004 07:21:25 -0500
Mike,
Thanks for the reply.
I don't need to use capture (which is how I tried it at first), but
SwitchToMode will be asynchronous without a capture (on the other hand,
evidence suggests that it isn't synchronous WITH it either). So if I leave
out the capture, what is the recommended way to be sure the switch happens
before I do further work?
Thanks,
Jim
>
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.