mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-11-18 07:52:20 +00:00
30 lines
493 B
C++
30 lines
493 B
C++
#pragma once
|
|
|
|
#include <optional>
|
|
#include <vector>
|
|
#include <string>
|
|
#include <windows.h>
|
|
|
|
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<std::vector<DisplayMode>> getModes();
|
|
LSTATUS setModes(const std::vector<DisplayMode> &modes);
|
|
};
|