Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 2 - DrawSprocket / DrawSprocket Reference
DrawSprocket Functions / Choosing a Context and Saving Preferences


DSpContext_GetAttributes

You can use the DSpContext_GetAttributes function to get the attributes of a context as if it were in the active state.

OSStatus DSpContext_GetAttributes (
DSpContextReference inContext,
DSpContextAttributesPtr outAttributes);
inContext
The context whose attributes you want to get.
outAttributes
On exit, a pointer to an attributes structure describing the context.
function result
A result code.
DESCRIPTION
The DSpContext_GetAttributes function takes, in the inContext parameter, a reference to a context and returns, in the outAttributes parameter, a pointer to an attributes structure describing that context. The context is described as if it were in the active play state. The monitor frequency may not be known until a context is actually in the active play state, so it may be returned as zero.

You can use this function to confirm that the context returned from DSpFindBestContext has the characteristics you need. You may even adjust your drawing plans based on the results. For example, you might have requested a resolution mode such as 320x200x8 when calling DSpFindBestContext, but then learned from calling DSpContext_GetAttributes that the context is a 640x480x8 display. In such a case, you might still use the 640x480x8 display, but display a larger game image.

CALLING RESTRICTIONS
Do not call this function during an interrupt.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996