| Home
| Previous
| Next
| Up

SaveRestoreState

Save or restore the state of the display hardware.

Declaration

N_int32 NAPI GA_initFuncs::SaveRestoreState(
N_int32 subfunc,
void *saveBuf)

Prototype In

snap/graphics.h

Parameters

subfunc | Sub-function number
saveBuf | Buffer to save or restore data from.

Return Value

Size of the save buffer if subfunc is set to 2.

Description

This function provides support for saving and restoring the complete hardware state. This is useful for debuggers and other utility software that needs to be able to temporarily take over the display and restore it back to the original state it was in. This function is responsible for saving and restoring all hardware registers related to the graphics mode.

A buffer large enough to hold the entire hardware state must be allocated by the calling code and passed in the saveBuf parameter. In order to determine the size of the hardware state buffer to be allocated, the calling code should first call this function with subfunc set to 2 to determine the size of the hardware save/restore state buffer.

The following subfunctions are defined:

subfunction | description
0 | Save hardware state to saveBuf
1 | Restore hardware state from saveBuf
2 | Return state buffer size

Note: This function is not yet implemented in the SNAP 1.0 spec, and it may be obsoleted in a future specification.

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com