IPresentationManager::SetPreferredPresentDuration method (presentation.h)

Important

Some information relates to a prerelease product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Sets the preferred frame duration.

Syntax

HRESULT SetPreferredPresentDuration(
  SystemInterruptTime preferredDuration,
  SystemInterruptTime deviationTolerance
);

Parameters

preferredDuration

Type: SystemInterruptTime

The requested duration, in interrupt time.

deviationTolerance

Type: SystemInterruptTime

The allowed tolerance. If the magnitude of the difference between a supported system duration and the preferredDuration parameter is within the deviationTolerance parameter, that system duration will be used.

Return value

Type: HRESULT

If the function succeeds, it returns S_OK; otherwise, it returns an HRESULT value that indicates the error.

Remarks

Preferred frame duration is meant to be used as a hint to the system that it would be preferred to refresh the output at the specified framerate. Displays that support this rate, or a multiple, will be set into that mode if appropriate.

This parameter setting persists across presents.

Requirements

   
Header presentation.h