Created
November 27, 2019 16:13
-
-
Save misyltoad/51bd7ba33741e730a7623136a65c0b0b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D3DDISPLAYMODEEX mode; | |
mode.Size = sizeof(D3DDISPLAYMODEEX); | |
mode.Width = devMode.dmPelsWidth; | |
mode.Height = devMode.dmPelsHeight; | |
mode.RefreshRate = 0; | |
mode.Format = static_cast<D3DFORMAT>(Format); | |
mode.ScanLineOrdering = D3DSCANLINEORDERING_UNKNOWN; | |
if (devMode.dmFields & DM_DISPLAYFLAGS) { | |
mode.ScanLineOrdering = (devMode.dmDisplayFlags & DM_INTERLACED) | |
? D3DSCANLINEORDERING_INTERLACED | |
: D3DSCANLINEORDERING_PROGRESSIVE; | |
} | |
if (devMode.dmFields & DM_DISPLAYFREQUENCY) | |
mode.RefreshRate = devMode.dmDisplayFrequency; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment