mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-12-02 22:28:14 +00:00
[idd] helper: add parser for mode settings in registry
This commit is contained in:
29
idd/LGIddHelper/CRegistrySettings.h
Normal file
29
idd/LGIddHelper/CRegistrySettings.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#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);
|
||||
};
|
||||
Reference in New Issue
Block a user