#pragma once #include #include #include namespace Win32 { namespace DisplayMode { struct DisplayMode { DWORD width; DWORD height; DWORD bpp; DWORD refreshRate; }; struct EmulatedDisplayMode : DisplayMode { std::wstring deviceName; RECT rect; SIZE diff; }; struct Resolution { SIZE app; SIZE display; }; SIZE getAppResolution(const std::wstring& deviceName); DWORD getBpp(); SIZE getDisplayResolution(const std::wstring& deviceName); EmulatedDisplayMode getEmulatedDisplayMode(); MONITORINFOEXW getMonitorInfo(const std::wstring& deviceName); Resolution getResolution(const std::wstring& deviceName); ULONG queryDisplaySettingsUniqueness(); void installHooks(); using ::operator<; inline auto toTuple(const DisplayMode& dm) { return std::make_tuple(dm.width, dm.height, dm.bpp, dm.refreshRate); } } }