#pragma once #include #include #include #include struct DisplayMode { unsigned width; unsigned height; unsigned refresh; bool preferred; std::wstring toString(); }; class CRegistrySettings { HKEY hKey; public: CRegistrySettings(); ~CRegistrySettings(); LSTATUS open(); bool isOpen() { return !!hKey; } std::optional> getModes(); LSTATUS setModes(const std::vector &modes); std::optional getDefaultRefresh(); LSTATUS setDefaultRefresh(DWORD refresh); };