coastline 0.0.4
Loading...
Searching...
No Matches
DisplayMode Class Reference

A display mode of a driver. More...

#include <renderer.h>

Public Member Functions

void SetDescription (const DDSURFACEDESC &description)
 Replace the mode's DirectDraw surface description.
DisplayMode * GetPrevious () const
DisplayMode * GetNext () const
void SetPrevious (DisplayMode *mode)
 Link the preceding mode.
void SetNext (DisplayMode *mode)
 Link the following mode.
 DisplayMode ()
 Start an empty mode.
HRESULT GetSurfaceDescDimensions (int *pnWidth, int *pnHeight, int *pnBitDepth, int *pnRefreshRate)
 The size and the bits of a pixel of the mode.
bool IsDisplayModeSupportedByDevice (D3DDeviceNode *pDevice)
 Whether a device can draw in the depth of the mode.
bool IsDisplayModeMatch (int nWidth, int nHeight, int nBitDepth)
 Whether the mode has a size and a depth.

Detailed Description

A display mode of a driver.

The layout after desc is not recovered yet.

Constructor & Destructor Documentation

◆ DisplayMode()

DisplayMode::DisplayMode ( )
inline

Start an empty mode.

Member Function Documentation

◆ SetDescription()

void DisplayMode::SetDescription ( const DDSURFACEDESC & description)
inline

Replace the mode's DirectDraw surface description.

◆ GetPrevious()

DisplayMode * DisplayMode::GetPrevious ( ) const
inline
Returns
The previous display mode in the list.

◆ GetNext()

DisplayMode * DisplayMode::GetNext ( ) const
inline
Returns
The next display mode in the list.

◆ SetPrevious()

void DisplayMode::SetPrevious ( DisplayMode * mode)
inline

Link the preceding mode.

◆ SetNext()

void DisplayMode::SetNext ( DisplayMode * mode)
inline

Link the following mode.

◆ GetSurfaceDescDimensions()

HRESULT DisplayMode::GetSurfaceDescDimensions ( int * pnWidth,
int * pnHeight,
int * pnBitDepth,
int * pnRefreshRate )

The size and the bits of a pixel of the mode.

Parameters
pnWidthReceives the width.
pnHeightReceives the height.
pnBitDepthReceives the bits of a pixel.
pnRefreshRateReceives the refresh rate, 0 for the default.
Returns
S_OK, or E_FAIL for a description without the size or the pixel format.
Ghidra address:
BRD3D: 0x1001ac80

◆ IsDisplayModeSupportedByDevice()

bool DisplayMode::IsDisplayModeSupportedByDevice ( D3DDeviceNode * pDevice)

Whether a device can draw in the depth of the mode.

Parameters
pDeviceThe device, or nullptr.
Returns
Whether the device draws in the depth.
Ghidra address:
BRD3D: 0x1001acf0

◆ IsDisplayModeMatch()

bool DisplayMode::IsDisplayModeMatch ( int nWidth,
int nHeight,
int nBitDepth )

Whether the mode has a size and a depth.

Parameters
nWidthThe width.
nHeightThe height.
nBitDepthThe bits of a pixel.
Returns
Whether the mode has them.
Ghidra address:
BRD3D: 0x1001ad50

The documentation for this class was generated from the following file: