MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetCurrentDisplayMode

Method GetCurrentDisplayMode

trinity/Tr2VideoAdapters.cpp:65–76  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: Get current display mode for given display adapter. Arguments: adapterIndex - index of display adapter (from 0 to GetAdapterCount) mode - (out) Tr2DisplayMode object with display mode properties Return Value: ALResult code of operation ----------------------------------------------------------------

Source from the content-addressed store, hash-verified

63// ALResult code of operation
64// --------------------------------------------------------------------------------------
65ALResult Tr2VideoAdapters::GetCurrentDisplayMode( unsigned adapterIndex,
66 Tr2DisplayMode** mode )
67{
68 *mode = nullptr;
69 Tr2DisplayModeInfo info;
70 CR_RETURN_HR( Tr2VideoAdapterInfo::GetAdapterDisplayMode( adapterIndex, info ) );
71 Tr2DisplayModePtr result;
72 result.CreateInstance();
73 result->m_mode = info;
74 *mode = result.Detach();
75 return S_OK;
76}
77
78// --------------------------------------------------------------------------------------
79// Description:

Callers

nothing calls this directly

Calls 2

CreateInstanceMethod · 0.80
DetachMethod · 0.80

Tested by

no test coverage detected