| 20 | { |
| 21 | |
| 22 | SwapChain::SwapChain() |
| 23 | { |
| 24 | refreshRate.Numerator = 60; |
| 25 | refreshRate.Denominator = 1; |
| 26 | |
| 27 | // Try to figure out if we should default to 1280x720 or 1920x1080 |
| 28 | POINT point; |
| 29 | point.x = 0; |
| 30 | point.y = 0; |
| 31 | HMONITOR monitor = MonitorFromPoint(point, MONITOR_DEFAULTTOPRIMARY); |
| 32 | if(monitor != 0) |
| 33 | { |
| 34 | MONITORINFOEX info; |
| 35 | ZeroMemory(&info, sizeof(info)); |
| 36 | info.cbSize = sizeof(MONITORINFOEX); |
| 37 | if(GetMonitorInfo(monitor, &info) != 0) |
| 38 | { |
| 39 | int32 monitorWidth = info.rcWork.right - info.rcWork.left; |
| 40 | int32 monitorHeight = info.rcWork.bottom - info.rcWork.top; |
| 41 | if(monitorWidth > 1920 && monitorHeight > 1080) |
| 42 | { |
| 43 | width = 1920; |
| 44 | height = 1080; |
| 45 | } |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | SwapChain::~SwapChain() |
| 51 | { |
nothing calls this directly
no outgoing calls
no test coverage detected